Naive number questions
goran.krampe at bluefish.se
goran.krampe at bluefish.se
Thu Nov 4 14:13:45 UTC 2004
Bert Freudenberg <bert at impara.de> wrote:
> Am 02.11.2004 um 22:42 schrieb Andreas Raab:
>
> > Besides, one of the more interesting things to do is to not use
> > "long/int" but rather the Object integer type.
>
> Yep. On my machine the speed then is almost equal. Mind you, Squeak
> Interpreter vs. Java JIT:
>
> | x |
> x := 0.
> (Time millisecondsToRun: [
> 1 to: 2 do: [: i|
> 1 to: 100000000 do: [:j | x := x + 1]]]) -> x
>
> 80244->200000000
Just tried in 3.7b5/3.9alpha image, got:
12757->200000000
And then:
gokr at zaphod ~ $ javac Numtest.java && java Numtest
13303
200000000
gokr at zaphod ~ $ java -version
java version "1.4.2-rc1"
Java(TM) 2 Runtime Environment, Standard Edition (build
Blackdown-1.4.2-rc1)
Java HotSpot(TM) Client VM (build Blackdown-1.4.2-rc1, mixed mode)
I also don't have a newer Java installed, but anyway - my tuned Squeak
beat 1.4.2! :)
regards, Göran
More information about the Squeak-dev
mailing list
|