Tamarin Benchmarks - Now Featuring Type Annotations

Andreas pointed out that the for loop example might be a bit more interesting if we add type annotations to the source. So let's take another look at Tamarin with added type annotations. The new found source:

package{
var j:Number = 0;
for (var i:Number = 0; i < 100000000; i++) {
j++;
}
}
Here are the numbers:
Tamarin-Central Compiler
time ./shell -Dforcemir ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m0.452s
user 0m0.445s
sys 0m0.007s

Tamarin-Tracing Single Interpreter - Compiler on
time ./avmplus ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m5.006s
user 0m4.923s
sys 0m0.041s

Tamarin-Tracing Double Interpreter - Compiler on
time ./avmplus ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m6.529s
user 0m6.496s
sys 0m0.033s

SpiderMonkey 1.8 (Copied from previous post for convenience)
time ./js ~/Projects/tamarin-central/test/custom/forLoop.js

real 0m6.396s
user 0m6.385s
sys 0m0.011s

Even with type annotations, Tamarin squeaks by SpiderMonkey 1.8. Remember, the previous test was untyped code.

Finally, what if we change the type from Number to integer. The new source code:

package{
var j:int = 0;
for (var i:int = 0; i < 100000000; i++) {
j++;
}
}
And the results:
Tamarin-Tracing Single Interpreter - Compiler on
time ./avmplus ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m2.384s
user 0m2.331s
sys 0m0.034s

Tamarin-Tracing Double Interpreter - Compiler on
time ./avmplus ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m1.301s
user 0m1.273s
sys 0m0.027s

Tamarin-Central - Compiler on
time ./shell -Dforcemir ~/Projects/tamarin-central/test/custom/forLoop.abc

real 0m0.373s
user 0m0.362s
sys 0m0.007s

The resulting speed boost from using an integer type is quite nice.

*Added the flag -Dforcemir to tamarin-central to force compilation. Thx for the tip Rick.