QuickSilver Smalltalk Speed Tests

February 5, 2011

QuickSilver Speed Testing

QuickSilver Speed Testing


Several standard messages are now handled by the QuickSilver compiler.

These include:

  • ifTrue:
  • ifTrue:ifFalse:
  • ifFalse:
  • ifFalse:ifTrue:
  • whileTrue:
  • whileFalse:
  • whileTrue
  • whileFalse
  • to:do:
  • to:do:by:
  • value
  • value:value:
  • value:value:value:
  • value:value:value:value:
  • value:value:value:value:value:
  • value:value:value:value:value:value:
  • value:value:value:value:value:value:value:

I have done some basic speed comparisons for numeric operations between QuickSilver Smalltalk and Squeak Smalltalk.

It appears that QuickSilver is about 10 times the speed of Squeak for the tests that I ran. Both QuickSilver and Squeak produced identical results in the tests.

Here are some of the tests:

| x |
x := 0.
1 to: 1000000 by: 5 do:[:i | x := x + i].

| x blk |
blk := [:i | x := x+i].
1 to: 1000000 do:[:i| blk value:i].

| x i |
x := i := 0.
[x := x + i.
i := i + 1.
i > 1000000] whileFalse.
^ x

I have also done some tests for QuickSilver packaging using Google’s Closure JavaScript compiler (not to be confused with Clojure which is a Lisp implementation).

With simple whitespace removal, the QuickSilver compiler and runtime are about 50-60kb which when “zipped” is a bit over 20kb.

In other words, the QuickSilver Smalltalk compiler and runtime will probably be smaller than the popular jQuery JavaScript library.

The source code for QuickSilver Version 0.3 is here.


2 Responses to “QuickSilver Smalltalk Speed Tests”

  1. Great work Peter!

    I’m really enjoying following this each day.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: