mirror of
https://github.com/nim-lang/Nim.git
synced 2026-02-17 00:24:16 +00:00
CI tests run faster: save 120s in azure machines, 335s on local OSX
This commit is contained in:
committed by
Andreas Rumpf
parent
9b8c9abead
commit
fdc5925cbd
@@ -14,8 +14,20 @@ proc makeObj(): TTestObj =
|
||||
result.x = "Hello"
|
||||
result.s = @[1,2,3]
|
||||
|
||||
const numIter =
|
||||
when defined(boehmgc):
|
||||
# super slow because GC_fullcollect() at each iteration; especially
|
||||
# on OSX 10.15 where it takes ~170s
|
||||
# `getOccupiedMem` should be constant after each iteration for i >= 3
|
||||
1_000
|
||||
elif defined(gcMarkAndSweep):
|
||||
# likewise, somewhat slow, 1_000_000 would run for 8s
|
||||
# and same remark as above
|
||||
100_000
|
||||
else: 1_000_000
|
||||
|
||||
proc inProc() =
|
||||
for i in 1 .. 1_000_000:
|
||||
for i in 1 .. numIter:
|
||||
when defined(gcMarkAndSweep) or defined(boehmgc):
|
||||
GC_fullcollect()
|
||||
var obj: TTestObj
|
||||
|
||||
Reference in New Issue
Block a user