The change of Delay from milliseconds to microseconds is ready for human
review. (https://pharo.fogbugz.com/default.asp?14353)
With this change from milliseconds to microseconds, clock rollover is
eliminated, but it seems Delays run at reduced performance.
newCodeEnabled
FALSE TRUE
128507 101227 delays scheduled per second
100% 79% relative performance
7.8 9.9 microseconds per scheduled delay
100% 127% relative performance
I "guess" this is due to the move from 32bit millisecond immediate
SmallIntegers to 64bit microsecond boxed LargePositiveIntegers. It
would be interesting to check this on Spur64, but for now, is this
performance penalty a reasonable trade for eliminating delay clock rollover?
The Delay class comment warns of the critical performance its high
priority event loop, and on paper a 21% drop in performance seems
significant, but actually the main Morph interCyclePause is 50
milliseconds. So... (9.9 - 7.8) / 50000 = 0.004% difference in
performance. (Did I get that right?)
Comments?
P.S. DelayBenchmark results...
===============
DelayBenchmark withNewCodeEnabled: true...
#ConcurrentDelays: 1000 . Count: 39018 per second
#ConcurrentDelays: 2000 . Count: 71906 per second
#ConcurrentDelays: 3000 . Count: 98010 per second
#ConcurrentDelays: 4000 . Count: 101227 per second
#ConcurrentDelays: 5000 . Count: 64728 per second
#ConcurrentDelays: 6000 . Count: 90495 per second
#ConcurrentDelays: 7000 . Count: 89220 per second
#ConcurrentDelays: 8000 . Count: 89585 per second
#ConcurrentDelays: 9000 . Count: 88393 per second
#ConcurrentDelays: 10000 . Count: 89073 per second
DelayBenchmark withNewCodeEnabled: false...
#ConcurrentDelays: 1000 . Count: 39498 per second
#ConcurrentDelays: 2000 . Count: 77808 per second
#ConcurrentDelays: 3000 . Count: 99889 per second
#ConcurrentDelays: 4000 . Count: 117632 per second
#ConcurrentDelays: 5000 . Count: 128507 per second
#ConcurrentDelays: 6000 . Count: 118729 per second
#ConcurrentDelays: 7000 . Count: 114437 per second
#ConcurrentDelays: 8000 . Count: 114792 per second
#ConcurrentDelays: 9000 . Count: 115137 per second
#ConcurrentDelays: 10000 . Count: 113973 per second