I also tried with a modified #benchFor: that doesn't use a forked block, and that fixed the issue.
benchFor: duration
"Run me for duration and return a BenchmarkResult"
"[ 100 factorial ] benchFor: 2 seconds"
| count started endTime |
count := 0.
started := Time millisecondClockValue.
endTime := started + duration asMilliSeconds.
[ Time millisecondClockValue > endTime ] whileTrue: [ self value. count := count + 1 ].
^ BenchmarkResult new��
iterations: count;��
elapsedTime: (Time millisecondsSince: started) milliSeconds;��
yourself
Do you think comparing each time, instead of using #fork is a bad idea? That's how it was working #bench in Pharo 3.