Serverside Javascript Tracemonkey Performance – Part I

Path: mv.asterisco.pt!mvalente
From: mvale…@ruido-visual.pt (Mario Valente)
Newsgroups: mv
Subject: Serverside Javascript Tracemonkey Performance – Part I
Date: Sun, 24 Aug 08 15:11:21 GMT

Last night I finally got the 1.8 release of the
C Spidermonkey Javascript interpreter/compiler/VM to
run serverside (the so-called Tracemonkey version).

I intend to run some performance tests between JS 1.6
and JS 1.8 (tracemonkey), namely using the Sunspider and
Dromaeo benchmarks. Not an easy task since they are setup
for browser side testing, but I’ll get there.

Meanwhile, here’s the performance with the “perfect.js”
test that comes bundled in Spidermonkey:

———————————————————
[root@localhost src]# time js perfect.js

A number is ‘perfect’ if it is equal to the sum of its
divisors (excluding itself).

The perfect numbers up to 50000 are:
6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248
8128 = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 127 + 254 + 508 + 1016 + 2032 + 4064
That’s all.

real 0m4.053s
user 0m0.720s
sys 0m0.020s
———————————————————

———————————————————
[root@localhost src]# time js18 -j perfect.js

A number is ‘perfect’ if it is equal to the sum of its
divisors (excluding itself).

The perfect numbers up to 50000 are:
6 = 1 + 2 + 3
28 = 1 + 2 + 4 + 7 + 14
496 = 1 + 2 + 4 + 8 + 16 + 31 + 62 + 124 + 248
8128 = 1 + 2 + 4 + 8 + 16 + 32 + 64 + 127 + 254 + 508 + 1016 + 2032 + 4064
That’s all.

real 0m3.622s
user 0m0.570s
sys 0m0.010s
———————————————————

— MV

Comments are closed.