Skip to content

Commit 3742326

Browse files
authored
Only run GC 3 times instead of 4 to scrub (#350)
* Only run GC 3 times instead of 4 to scrub Per slack, 'Diogo changed it so it only needs 3 to promote everything to old generation now'. * Still run gc 4 times on older Julia versions * Format
1 parent 42155f7 commit 3742326

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/execution.jl

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
11
# Trigger several successive GC sweeps. This is more comprehensive than running just a
22
# single sweep, since freeable objects may need more than one sweep to be appropriately
33
# marked and freed.
4-
gcscrub() = (GC.gc(); GC.gc(); GC.gc(); GC.gc())
4+
function gcscrub()
5+
GC.gc()
6+
GC.gc()
7+
GC.gc()
8+
@static if VERSION < v"1.10"
9+
GC.gc()
10+
end
11+
end
512

613
#############
714
# Benchmark #

0 commit comments

Comments
 (0)