Skip to content

Commit b601dce

Browse files
committed
Quick test -- avoid dynamic allocations
1 parent 6a1ccf0 commit b601dce

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/coloring.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ function star_coloring(g::AdjacencyGraph, order::AbstractOrder; postprocessing::
8888
edge_to_index = Vector{Int}(undef, nnz(S))
8989
star = Vector{Int}(undef, ne)
9090
hub = Int[] # one hub for each star, including the trivial ones
91+
sizehint!(hub, ne)
9192
nb_spokes = Int[] # number of spokes for each star
93+
sizehint!(nb_spokes, ne)
9294
vertices_in_order = vertices(g, order)
9395

9496
# edge_to_index gives an index for each edge

0 commit comments

Comments
 (0)