Skip to content

Commit d27f7f4

Browse files
KristofferCclaude
andcommitted
Comment out forced GC.gc() calls in test_getindex_algs (#740)
Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent 5e1300e commit d27f7f4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

test/sparsematrix_constructors_indexing.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -834,7 +834,9 @@ end
834834
times = Float64[0,0,0]
835835
best = [typemax(Float64), 0]
836836
for searchtype in [0, 1, 2]
837-
GC.gc()
837+
# stabilizes the debug timings below, but forces 180 full
838+
# collections across these loops which dominates the file's GC time
839+
# GC.gc()
838840
tres = @timed test_getindex_algs(S, I, J, searchtype)
839841
res[searchtype+1] = tres[1]
840842
times[searchtype+1] = tres[2]
@@ -890,9 +892,9 @@ end
890892
for I in IA
891893
Isorted = sort(I)
892894
for S in SA
893-
GC.gc()
895+
# GC.gc() # see comment above
894896
ru = @timed S[I, J]
895-
GC.gc()
897+
# GC.gc()
896898
rs = @timed S[Isorted, Jsorted]
897899
if debug
898900
@printf(" %7d | %7d | %7d | %4.2e | %4.2e | %4.2e | %4.2e |\n", round(Int,nnz(S)/size(S, 2)), length(I), length(J), rs[2], ru[2], rs[3], ru[3])

0 commit comments

Comments
 (0)