Are We Fast Yet?

SuperCollider Are We Fast Yet?

The archive below has the SOM (Simple Object Machine) “Are We Fast Yet?” benchmarks translated into SuperCollider.

Details about the benchmarks are at:

I made these to test a Smalltalk to SuperCollider translator, not to benchmark SuperCollider, so I’ve no idea what the results mean!


The files are generated by printing the abstract syntax tree of the Smalltalk benchmark files as SuperCollider code.

They’re moderately idiomatic, except for naming conventions (at:put: is translated to atPut_ which SuperCollider would ordinarily write as put &etc.).

The file are-we-fast-yet.scd has entries to run each of the benchmarks.

All of the benchmarks run to completion, and all that have verification stages run correctly. (Some are very slow and I’ve only run the simplest inputs with verification results.)

A small number of compatibility extensions to the SuperCollider class library are required, these are included in the file


Interesting – I’m curious to take a closer look later.

While these extensions ease translation, every redirect does incur overhead, and SC method call overhead is fairly heavy – see, for instance, Splitting very large arrays - #5 by jamshark70 where the List:add redirect to Array:add roughly doubled the execution time :astonished: – about 0.95 sec adding to a pre-allocated array, 2.05 sec adding to a pre-allocated List.

So this approach will skew the measured times to be quite a lot slower than idiomatic SC.


Yes, though I’m not sure comparing sclang to other Som/Smalltalk implementations would be that helpful!

(Also these benchmarks are (I think) mostly intended to see how well optimising various systems are, so adding simple indirections to be optimised away could count as a virtue!)

But mostly I guess these could be useful for comparing sclang to itself over time (ie. is it getting faster or slower for various kinds of tasks &etc.)

Also since they have verification stages they can find errors (these found two) so they’re also a kind of test suite.

Also mentioned because the translator could be useful if anyone has Smalltalk libraries they’d like to translate!