I have written a bench with a big preparation in the setUp (and also tearDown). Unfortunately the setUp and the tearDown are called three times for a simple "run", I cannot do a "run: 100000" with just an only setUp.
performBenchmark: aSelector
"Based on an email by Eliot from May 16th, 2011.
The first time a method is executed it will get into the inline cache.
The second time, it is found in the inline cache, which triggers the JIT compiler to produce code.
Thus, the third time it should be executed in the steady state."
warmingUp := true.
suite runBenchmark: aSelector.
Smalltalk garbageCollect.
suite runBenchmark: aSelector.
Smalltalk garbageCollect.
warmingUp := false.
^ super performBenchmark: aSelector.
It's appear that the class SMarkCogRunner is used as default Runner, I am on Pharo 9 (64bits) is it still applicable ?
Do you know a solution ?
Do you have a best way to do a 'run: 10000' with a single setUp ?
Thanks.