Such a small benchmark

Viktor squeak-dev at lists.squeakfoundation.org
Wed Oct 16 19:12:18 UTC 2002


> To be a little bit more fair you should write the Squeak benchmark exactly
> like the C++ one:
>
> | a |
> a := Array new: 1.
> 1 to: 10000000 do: [:i| a at: 1 put: 3.]
>
> Using #to:do: gives a speed-up by 100% here!
>
> -- Bert

Now 1229 ms, 2731 % of Strongtalk.

Code (class method of Time)

microbenchmark

"Time microbenchmark"

^Time millisecondsToRun:

[ | a |
a:= Array new: 1.
1 to: 10000000 do: [:i| a at: 1 put: 3.]
]

Viktor




More information about the Squeak-dev mailing list