Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0: http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz
==================== Summary ====================
Name: Chronology-Core-mt.81 Author: mt Time: 22 February 2023, 11:27:44.882528 am UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af Ancestors: Chronology-Core-ct.80
Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.
=============== Diff against Chronology-Core-ct.80 ===============
Item was changed: ----- Method: Time class>>startUp: (in category 'system startup') ----- startUp: resuming
resuming ifTrue: [ + LastClockTick := 0. + HighResClockTicksPerMillisecond := 0 ]! - LastClockTick := 0 ]!
Item was added: + ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') ----- + useHighResClockForTiming: booleanOrNil + + UseHighResClockForTiming := booleanOrNil.!
Time startUp: true. Time useHighResClockForTiming: true. Time nanosecondsToRun: [ String new ]." 3193 "
Am 22.02.2023 11:27:55 schrieb commits@source.squeak.org commits@source.squeak.org: Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0: http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz
==================== Summary ====================
Name: Chronology-Core-mt.81 Author: mt Time: 22 February 2023, 11:27:44.882528 am UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af Ancestors: Chronology-Core-ct.80
Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.
=============== Diff against Chronology-Core-ct.80 ===============
Item was changed: ----- Method: Time class>>startUp: (in category 'system startup') ----- startUp: resuming
resuming ifTrue: [ + LastClockTick := 0. + HighResClockTicksPerMillisecond := 0 ]! - LastClockTick := 0 ]!
Item was added: + ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') ----- + useHighResClockForTiming: booleanOrNil + + UseHighResClockForTiming := booleanOrNil.!
FYI: It takes a notable amount of nanoseconds to even fetch the high-res clock value ...
[ String new ] bench " '72,900,000 per second. 13.7 nanoseconds per run. 8.29834 % GC time.' "
Best, Marcel Am 22.02.2023 11:39:44 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Time startUp: true. Time useHighResClockForTiming: true. Time nanosecondsToRun: [ String new ]." 3193 "
Am 22.02.2023 11:27:55 schrieb commits@source.squeak.org commits@source.squeak.org: Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0: http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz
==================== Summary ====================
Name: Chronology-Core-mt.81 Author: mt Time: 22 February 2023, 11:27:44.882528 am UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af Ancestors: Chronology-Core-ct.80
Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.
=============== Diff against Chronology-Core-ct.80 ===============
Item was changed: ----- Method: Time class>>startUp: (in category 'system startup') ----- startUp: resuming
resuming ifTrue: [ + LastClockTick := 0. + HighResClockTicksPerMillisecond := 0 ]! - LastClockTick := 0 ]!
Item was added: + ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') ----- + useHighResClockForTiming: booleanOrNil + + UseHighResClockForTiming := booleanOrNil.!
Actually, the algorithm in #nanosecondsToRunHighRes: accounts for that, but variation can be significant...
Thus, I would not recommend using #nanosecondsToRun: but use #bench for that instead.
Best, Marcel Am 22.02.2023 11:41:02 schrieb Marcel Taeumel marcel.taeumel@hpi.de: FYI: It takes a notable amount of nanoseconds to even fetch the high-res clock value ...
[ String new ] bench " '72,900,000 per second. 13.7 nanoseconds per run. 8.29834 % GC time.' "
Best, Marcel Am 22.02.2023 11:39:44 schrieb Marcel Taeumel marcel.taeumel@hpi.de: Time startUp: true. Time useHighResClockForTiming: true. Time nanosecondsToRun: [ String new ]." 3193 "
Am 22.02.2023 11:27:55 schrieb commits@source.squeak.org commits@source.squeak.org: Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0: http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz
==================== Summary ====================
Name: Chronology-Core-mt.81 Author: mt Time: 22 February 2023, 11:27:44.882528 am UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af Ancestors: Chronology-Core-ct.80
Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.
=============== Diff against Chronology-Core-ct.80 ===============
Item was changed: ----- Method: Time class>>startUp: (in category 'system startup') ----- startUp: resuming
resuming ifTrue: [ + LastClockTick := 0. + HighResClockTicksPerMillisecond := 0 ]! - LastClockTick := 0 ]!
Item was added: + ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') ----- + useHighResClockForTiming: booleanOrNil + + UseHighResClockForTiming := booleanOrNil.!
Hmmm, since the Covid knows about the hires clock on platforms with an instruction to access it, I could write quickly a machine code primitive version. Sounds like fun.
_,,,^..^,,,_ (phone)
On Feb 22, 2023, at 2:44 AM, Marcel Taeumel via Squeak-dev squeak-dev@lists.squeakfoundation.org wrote:
Actually, the algorithm in #nanosecondsToRunHighRes: accounts for that, but variation can be significant...
Thus, I would not recommend using #nanosecondsToRun: but use #bench for that instead.
Best, Marcel
Am 22.02.2023 11:41:02 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
FYI: It takes a notable amount of nanoseconds to even fetch the high-res clock value ...
[ String new ] bench " '72,900,000 per second. 13.7 nanoseconds per run. 8.29834 % GC time.' "
Best, Marcel
Am 22.02.2023 11:39:44 schrieb Marcel Taeumel marcel.taeumel@hpi.de:
Time startUp: true. Time useHighResClockForTiming: true. Time nanosecondsToRun: [ String new ]." 3193 "
Am 22.02.2023 11:27:55 schrieb commits@source.squeak.org commits@source.squeak.org:
Marcel Taeumel uploaded a new version of Chronology-Core to project Squeak 6.0: http://source.squeak.org/squeak60/Chronology-Core-mt.81.mcz
==================== Summary ====================
Name: Chronology-Core-mt.81 Author: mt Time: 22 February 2023, 11:27:44.882528 am UUID: e4a5b396-8917-7f46-a6c7-a6961ff588af Ancestors: Chronology-Core-ct.80
Fixes #highResClock usage by resetting the estimated #highResClockTicksPerMillisecond on system start-up. The preference #useHighResClockForTiming works now as well.
=============== Diff against Chronology-Core-ct.80 ===============
Item was changed: ----- Method: Time class>>startUp: (in category 'system startup') ----- startUp: resuming
resuming ifTrue: [
- LastClockTick := 0.
- HighResClockTicksPerMillisecond := 0 ]!
- LastClockTick := 0 ]!
Item was added:
- ----- Method: Time class>>useHighResClockForTiming: (in category 'preferences') -----
- useHighResClockForTiming: booleanOrNil
- UseHighResClockForTiming := booleanOrNil.!
squeak-dev@lists.squeakfoundation.org