Such a small benchmark

JohnMaloney at earthlink.net JohnMaloney at earthlink.net
Thu Oct 17 14:15:07 UTC 2002


Bob, Viktor, and all,

I'd assume that the StrongTalk compiler figures out that the index is a contant and thus
the bounds check can be moved out of the loop. Also, Viktor said these numbers
were for the best run, so the optimized translated method would be in the method
cache already (so we're not measuring the time for on-the-fly compilation).

The Self VM could sometimes turn in benchmarks that were actually *faster* than
C++. It achieved this through inlining the message sends done in the inner loop and
then being able to do a better job of optimizing the code once it was all in the same
procedure (better register allocation, constant folding, code motion out of loops, etc.)

The relative performance of Squeak versus C (about 50x slower) is just what I
expect of the current VM and, for a straight interpreter, it's pretty good. This is
the approximate speedup (50x) I expect to see when going from well-written
Squeak code to a translated C primitive for the same operation--for example,
this is roughly what I saw for the StarSqueak primitives.

Ian's Jitter would probably run this benchmark three to five times faster, giving
performance similar to Dolphin Smalltalk. The VisualWorks VM is very
impressive. This kind of benchmark is one of the toughest on which to compare
Smalltlak to C. Of course, C's has much weaker semantics--no range checking,
for example.

The strengths of Squeak's VM are simplicity, portability, and easy extensibility
(i.e. adding primitives by translating from Smalltalk to C). It has benefitted from
the relentless march of Moore's Law and from the fact that, for media-rich
applications, most of the heavy lifting is done by primitives, which *are* C code.

	-- John


>On Wed, 16 Oct 2002 18:12:21 +0200 "Viktor" <vi.ki at worldonline.cz> wrote:
>Hmm... that *real* fast. 10 million #at:put: in 45 ms equals 222 million per second. Or roughly one every 6 clock cycles on your computer. Six cycles for range-checking in addition to storing is just this side of amazing. How'd they do that?
>
>Cheers,
>Bob





More information about the Squeak-dev mailing list