Measurement host:
- "Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz" laptop
Duktape is compiled with:
- gcc-4.8.4 (Ubuntu 14.04.3) on x64
gcc -O2
- debugger and interrupt executor support enabled
- fastints enabled
JSON.stringify()
fast path disabled
Note that:
-
These are microbenchmarks, and don't necessarily represent application performance very well. Microbenchmarks are useful for measuring how well different parts of the engine work.
-
Only relative numbers matter. Loop counts differ between test cases so the numbers for two tests are not directly comparable. Absolute numbers may also change between test runs if test target is different.
-
The measurement process is not very accurate: it's based on running the test multiple times and measuring time using the
time
command.
Testcase | duk 1.3.0 | duk 1.2.3 | duk 1.1.3 | rhino | lua 5.1 | python | perl | ruby |
---|---|---|---|---|---|---|---|---|
test-array-read.js | 4.13 | 5.62 | 7.96 | 0.99 | 1.19 | 5.64 | 5.34 | 4.41 |
test-array-write.js | 4.37 | 6.04 | 22.21 | 1.59 | 1.38 | 6.30 | 5.32 | 6.89 |
test-bitwise-ops.js | 0.85 | 1.11 | 5.06 | 8.41 | n/a | n/a | n/a | n/a |
test-buffer-nodejs-read.js | 4.61 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
test-buffer-nodejs-write.js | 5.52 | n/a | n/a | n/a | n/a | n/a | n/a | n/a |
test-buffer-object-read.js | 4.62 | 21.63 | 25.47 | n/a | n/a | n/a | n/a | n/a |
test-buffer-object-write.js | 5.53 | 24.61 | 28.58 | n/a | n/a | n/a | n/a | n/a |
test-buffer-plain-read.js | 4.24 | 5.25 | 7.70 | n/a | n/a | n/a | n/a | n/a |
test-buffer-plain-write.js | 3.75 | 5.28 | 10.55 | n/a | n/a | n/a | n/a | n/a |
test-call-basic.js | 14.42 | 15.52 | 20.05 | 3.87 | 2.41 | 9.02 | 9.70 | 6.24 |
test-compile-mandel-nofrac.js | 13.21 | 16.52 | 18.38 | 7.54 | n/a | n/a | n/a | n/a |
test-compile-mandel.js | 16.32 | 19.49 | 21.45 | 7.58 | n/a | n/a | n/a | n/a |
test-compile-short.js | 10.17 | 9.91 | 11.07 | 4.11 | n/a | n/a | n/a | n/a |
test-const-load.js | 5.96 | 9.48 | 10.88 | 0.30 | 2.10 | 5.41 | 24.22 | 4.01 |
test-empty-loop.js | 2.33 | 3.10 | 5.73 | 0.66 | 0.94 | 4.50 | 3.40 | 3.30 |
test-fib.js | 8.57 | 9.39 | 9.77 | 1.22 | 1.32 | 2.39 | 6.39 | 1.51 |
test-global-lookup.js | 9.98 | 10.59 | 11.52 | 1.22 | n/a | n/a | n/a | n/a |
test-hello-world.js | 0.00 | 0.00 | 0.00 | 0.23 | 0.00 | 0.00 | 0.00 | 0.00 |
test-hex-decode.js | 5.30 | 5.30 | 9.30 | n/a | n/a | 12.33 | n/a | n/a |
test-hex-encode.js | 26.28 | 26.32 | 28.56 | n/a | n/a | 2.85 | n/a | n/a |
test-json-integer-parse.js | 0.41 | 0.42 | 0.41 | 1.07 | n/a | 0.07 | n/a | n/a |
test-json-number-parse.js | 5.09 | 4.98 | 5.23 | 1.58 | n/a | 0.29 | n/a | n/a |
test-json-serialize.js | 1.56 | 3.08 | 3.21 | 3.29 | n/a | 0.51 | n/a | n/a |
test-json-string-bench.js | 5.41 | 5.38 | 6.63 | 2.11 | n/a | n/a | n/a | n/a |
test-json-string-parse.js | 0.55 | 2.99 | 2.99 | 2.46 | n/a | n/a | n/a | n/a |
test-json-string-stringify.js | 1.23 | 3.53 | 3.50 | 6.15 | n/a | 0.48 | n/a | n/a |
test-prop-read.js | 7.58 | 8.48 | 12.00 | 1.07 | 1.24 | 6.17 | 6.86 | 14.56 |
test-prop-write.js | 6.95 | 7.75 | 11.47 | 2.14 | 1.42 | 6.49 | 6.91 | 18.21 |
test-reg-load.js | 2.75 | 4.29 | 5.29 | 0.30 | 2.25 | 5.70 | n/a | 4.04 |
test-reg-readwrite-object.js | 3.72 | 5.33 | 7.03 | 0.34 | 1.72 | 4.72 | 28.35 | 3.87 |
test-reg-readwrite-plain.js | 2.48 | 3.93 | 4.67 | 0.37 | 1.72 | 4.73 | 30.16 | 3.98 |
test-regexp-string-parse.js | 10.51 | 12.59 | 12.43 | n/a | n/a | 0.46 | n/a | n/a |
test-string-array-concat.js | 6.37 | 7.52 | 24.43 | 2.02 | 2.06 | 2.83 | 7.40 | 7.74 |
test-string-compare.js | 3.76 | 4.56 | 6.07 | 5.67 | 2.80 | 4.85 | 16.13 | 5.30 |
test-string-decodeuri.js | 3.54 | 4.10 | 4.02 | 1.91 | n/a | n/a | n/a | n/a |
test-string-encodeuri.js | 4.29 | 6.17 | 6.24 | 6.82 | n/a | n/a | n/a | n/a |
test-string-intern-match.js | 2.35 | 2.36 | 2.41 | n/a | n/a | n/a | n/a | n/a |
test-string-intern-miss.js | 2.51 | 2.54 | 2.76 | n/a | n/a | n/a | n/a | n/a |
test-string-plain-concat.js | 4.06 | 4.07 | 4.06 | 0.31 | 0.59 | 0.00 | 0.41 | 0.71 |
test-string-uppercase.js | 2.55 | 3.28 | 3.26 | 2.55 | n/a | 1.21 | n/a | n/a |