[squeak-dev] Cog 2776 on Intel i7-4790K @ 4GHz
Chris Muller
asqueaker at gmail.com
Sun Aug 31 22:00:48 UTC 2014
>> 0 tinyBenchmarks '1,708,090,075 bytecodes/sec; 199,734,789 sends/sec'
>
> Nice.
>
>> [] bench '131,000,000 per second.'
>
> Hmm, this mostly measures the millisecondClockValue primitive.
>
> How about we replace this
>
> count := 0.
> endTime := Time millisecondClockValue + 5000.
> startTime := Time millisecondClockValue.
> [ Time millisecondClockValue > endTime ] whileFalse: [ self value. count := count + 1 ].
> endTime := Time millisecondClockValue.
>
> with
>
> count := 0.
> repeat := true.
> [(Delay forSeconds: 5) wait. repeat := false] forkAt: Processor activePriority + 1.
> startTime := Time millisecondClockValue.
> [ self value. count := count + 1. repeat ] whileTrue.
> endTime := Time millisecondClockValue.
>
> which on my machine makes it go from
>
> '70,800,000 per second.'
>
> to
>
> '168,000,000 per second.'
Wow, I didn't realize millisecondClockValue had that much of an
impact! Yours is defiintely less-intrusive, we should update #bench..
More information about the Squeak-dev
mailing list
|