Duktape 1.5.0 performance measurement

Duktape 1.5.0 performance measurement

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 (not default)
  • JSON.stringify() fast path enabled for columns marked "json", disabled otherwise (default)

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.

  • Rhino, Node.js, and LuaJIT are JIT-based engines which are typically 10-100x faster than interpreting engines (like Duktape, MuJS, Lua, etc). Some microbenchmark results may be non-representative because a JIT engine may e.g. eliminate repeated assignments, intended to exercise assignment performance, as dead code.

Performance summary

duk.O2.150json duk.O2.150nojson duk.O2.140json duk.O2.140nojson duk.O2.130 duk.O2.125 duk.O2.113 duk.O2.102 | 0.39 n/a n/a n/a n/a rhino node luajit
test-add-fastint.js 0.08 0.08 0.08 0.08 0.10 0.15 0.17 0.18 mujs lua python perl ruby | 0.28 0.02 n/a
test-add-float.js 0.07 0.08 0.07 0.07 0.11 0.14 0.17 0.20 mujs lua python perl ruby | 0.29 0.02 n/a
test-add-nan-fastint.js 0.09 0.09 0.14 0.09 0.13 0.16 0.17 0.18 mujs lua python perl ruby | 0.27 0.02 n/a
test-add-nan.js 0.08 0.08 0.07 0.07 0.11 0.15 0.17 0.18 mujs lua python perl ruby | 0.28 0.02 n/a
test-array-read.js 2.13 2.16 2.10 2.10 2.02 2.61 2.97 2.97 mujs lua python perl ruby | 0.38 0.05 0.00
test-array-write.js 2.59 2.53 2.59 2.59 2.45 3.16 16.43 16.54 mujs lua python perl ruby | 1.07 0.05 0.00
test-assign-add.js 5.19 5.20 5.23 5.22 8.76 11.03 10.55 11.42 mujs lua python perl ruby | 3.60 0.02 0.00
test-assign-addto-nan.js 1.54 1.57 1.43 1.43 2.10 3.58 2.74 2.94 mujs lua python perl ruby | 0.33 0.23 n/a
test-assign-addto.js 5.19 5.22 5.22 5.26 8.84 14.79 10.60 11.41 mujs lua python perl ruby | 3.45 0.81 0.92
test-assign-const-int.js 2.61 2.62 2.59 2.56 6.98 4.76 9.76 10.30 mujs lua python perl ruby | 0.31 0.02 0.00
test-assign-const.js 4.25 4.24 3.92 4.01 6.06 4.74 11.08 11.56 mujs lua python perl ruby | 0.32 0.03 0.00
test-assign-literal.js 4.17 4.27 4.26 4.33 7.03 9.22 10.75 11.50 mujs lua python perl ruby | 0.32 0.02 0.00
test-assign-proplhs-reg.js 3.67 3.71 3.80 3.63 3.96 4.10 4.59 3.85 mujs lua python perl ruby | 1.70 n/a n/a
test-assign-proprhs.js 4.18 4.18 4.23 4.16 4.69 5.60 5.43 5.50 mujs lua python perl ruby | 0.83 0.03 n/a
test-assign-reg.js 2.79 2.84 2.88 2.89 2.86 9.57 5.38 5.54 mujs lua python perl ruby | 0.32 0.02 0.00
test-base64-decode-whitespace.js 1.84 1.94 1.92 1.88 11.01 10.40 10.95 10.69 mujs lua python perl ruby | n/a n/a n/a
test-base64-decode.js 1.51 1.51 1.52 1.50 5.99 5.27 5.76 5.25 mujs lua python perl ruby | n/a n/a n/a
test-base64-encode.js 1.81 1.86 1.84 1.82 17.37 17.10 16.91 16.91 mujs lua python perl ruby | n/a n/a n/a
test-bitwise-ops.js 0.66 0.72 0.76 0.80 0.91 1.15 5.05 5.32 mujs lua python perl ruby | 7.82 0.06 n/a
test-break-fast.js 1.59 1.60 1.70 1.73 1.49 1.90 1.91 1.98 mujs lua python perl ruby | 0.30 0.04 n/a
test-break-slow.js 7.96 7.90 7.79 7.76 11.25 11.77 11.50 11.56 mujs lua python perl ruby | 0.29 0.54 n/a
test-buffer-nodejs-read.js 2.60 2.64 2.79 2.69 2.49 n/a n/a n/a mujs lua python perl ruby | n/a 0.02 n/a
test-buffer-nodejs-write.js 3.04 3.10 3.06 3.06 3.31 n/a n/a n/a mujs lua python perl ruby | n/a 0.05 n/a
test-buffer-object-read.js 2.67 2.69 2.83 2.75 2.43 18.63 19.26 18.96 mujs lua python perl ruby | n/a n/a n/a
test-buffer-object-write.js 3.06 3.10 3.06 3.08 3.34 21.86 22.13 20.24 mujs lua python perl ruby | n/a n/a n/a
test-buffer-plain-read.js 2.25 2.25 2.25 2.28 2.00 2.49 2.72 2.75 mujs lua python perl ruby | n/a n/a n/a
test-buffer-plain-write.js 1.83 1.86 1.91 1.87 1.77 2.34 5.05 3.20 mujs lua python perl ruby | n/a n/a n/a
test-call-basic-1.js 9.18 9.32 9.13 9.08 12.19 12.25 14.28 14.00 mujs lua python perl ruby | 1.42 0.02 0.00
test-call-basic-2.js 9.14 9.31 9.13 9.00 12.12 12.20 14.45 14.03 mujs lua python perl ruby | 0.62 0.02 n/a
test-call-basic-3.js 14.80 15.00 14.78 14.68 19.59 19.91 21.24 21.30 mujs lua python perl ruby | 0.60 0.12 n/a
test-call-basic-4.js 36.96 36.57 35.56 35.61 45.09 49.39 50.37 49.92 mujs lua python perl ruby | 1.53 0.52 n/a
test-call-native.js 13.74 13.78 14.16 13.59 18.86 18.73 20.85 20.62 mujs lua python perl ruby | 1.51 3.78 n/a
test-compile-mandel-nofrac.js 13.22 13.32 13.26 13.19 13.31 16.96 18.52 18.36 mujs lua python perl ruby | 7.05 0.07 n/a
test-compile-mandel.js 16.50 16.49 16.27 16.18 16.45 19.96 21.64 21.52 mujs lua python perl ruby | 7.03 0.03 n/a
test-compile-short.js 9.91 10.12 9.99 9.96 10.23 10.08 11.08 10.81 mujs lua python perl ruby | 3.65 0.16 n/a
test-continue-fast.js 2.15 2.16 2.20 2.17 1.91 2.52 2.73 2.76 mujs lua python perl ruby | 0.51 0.02 n/a
test-continue-slow.js 8.46 8.45 8.44 8.45 11.82 12.61 12.46 12.57 mujs lua python perl ruby | 0.51 0.57 n/a
test-empty-loop.js 2.27 2.26 2.30 2.38 2.36 3.13 5.74 5.88 mujs lua python perl ruby | 0.69 0.07 0.11
test-fib.js 7.78 8.74 7.96 7.67 8.71 9.18 10.10 9.76 mujs lua python perl ruby | 1.16 0.15 0.30
test-global-lookup.js 10.12 11.81 10.87 10.17 10.05 10.60 11.67 11.16 mujs lua python perl ruby | 1.17 0.02 n/a
test-hello-world.js 0.00 0.00 0.00 0.00 0.00 0.00 0.00 0.00 mujs lua python perl ruby | 0.23 0.02 0.00
test-hex-decode.js 3.61 3.60 3.65 3.61 5.34 5.37 9.39 9.38 mujs lua python perl ruby | n/a n/a n/a
test-hex-encode.js 2.83 2.83 2.87 2.84 6.05 6.04 6.73 6.70 mujs lua python perl ruby | n/a n/a n/a
test-jc-serialize-indented.js 3.48 22.53 3.65 23.01 34.32 37.12 41.21 44.81 mujs lua python perl ruby | n/a n/a n/a
test-jc-serialize.js 2.39 21.08 2.51 21.39 28.90 30.87 34.59 34.21 mujs lua python perl ruby | n/a n/a n/a
test-json-parse-hex.js 3.39 3.37 3.45 3.42 6.63 6.66 8.36 8.36 mujs lua python perl ruby | n/a n/a n/a
test-json-parse-integer.js 4.12 4.10 3.98 4.07 4.08 4.08 4.09 4.19 mujs lua python perl ruby | 2.21 0.36 n/a
test-json-parse-number.js 5.17 5.17 5.21 5.17 5.11 5.07 5.27 5.26 mujs lua python perl ruby | 1.57 0.17 n/a
test-json-parse-string.js 5.74 5.56 5.50 5.71 5.64 30.27 30.29 30.26 mujs lua python perl ruby | 22.59 6.42 n/a
test-json-serialize-fastpath-loop.js 3.55 19.80 3.68 19.43 32.52 35.84 39.21 38.29 mujs lua python perl ruby | 111.82 34.78 n/a
test-json-serialize-forceslow.js 10.90 10.30 11.14 10.30 12.55 12.56 12.99 12.59 mujs lua python perl ruby | 5.55 0.70 n/a
test-json-serialize-hex.js 1.45 1.47 1.52 1.48 2.76 24.40 23.80 22.51 mujs lua python perl ruby | n/a n/a n/a
test-json-serialize-indented-deep100.js 2.35 2.34 2.39 2.29 3.66 3.74 3.86 3.85 mujs lua python perl ruby | 40.37 0.99 n/a
test-json-serialize-indented-deep25.js 3.28 28.09 3.36 27.47 45.28 46.98 55.20 49.53 mujs lua python perl ruby | 61.82 14.03 n/a
test-json-serialize-indented-deep500.js 1.48 1.49 1.45 1.44 2.37 2.42 2.51 2.47 mujs lua python perl ruby | 1267.28 0.52 n/a
test-json-serialize-indented.js 6.26 44.53 6.29 45.62 67.72 75.11 81.32 82.33 mujs lua python perl ruby | 25.33 23.61 n/a
test-json-serialize-jsonrpc-message.js 2.00 2.56 2.02 2.56 4.00 7.83 8.05 7.77 mujs lua python perl ruby | n/a n/a n/a
test-json-serialize-nofrac.js 0.69 4.76 0.71 4.82 0.72 6.83 7.42 7.30 mujs lua python perl ruby | 4.17 0.62 n/a
test-json-serialize-slowpath-loop.js 5.90 5.92 5.83 5.78 8.68 9.45 10.33 10.13 mujs lua python perl ruby | 11.82 2.95 n/a
test-json-serialize.js 6.20 10.13 6.24 10.35 6.23 12.53 12.93 12.78 mujs lua python perl ruby | 5.39 0.70 n/a
test-json-string-bench.js 5.23 5.30 5.29 5.33 5.44 5.44 6.67 6.61 mujs lua python perl ruby | 2.09 0.26 n/a
test-json-string-stringify.js 5.06 5.04 5.21 5.23 6.43 17.76 17.83 17.11 mujs lua python perl ruby | 18.37 5.99 n/a
test-jx-serialize-bufobj-forceslow.js 5.20 4.54 5.73 5.19 6.14 n/a n/a n/a mujs lua python perl ruby | n/a n/a n/a
test-jx-serialize-bufobj.js 1.12 4.35 1.09 4.93 5.98 n/a n/a n/a mujs lua python perl ruby | n/a n/a n/a
test-jx-serialize-indented.js 3.46 22.49 3.68 22.65 34.04 35.92 40.11 40.16 mujs lua python perl ruby | n/a n/a n/a
test-jx-serialize.js 2.41 20.72 2.54 21.21 28.79 30.82 34.32 33.58 mujs lua python perl ruby | n/a n/a n/a
test-mandel.js 4.34 4.39 4.38 4.37 4.70 5.89 6.39 6.75 mujs lua python perl ruby | 1.57 0.21 n/a
test-object-garbage.js 4.34 4.56 4.61 4.64 4.57 4.81 5.03 4.91 mujs lua python perl ruby | 0.97 0.14 0.00
test-prop-read.js 4.76 4.81 4.91 4.88 5.26 6.20 6.47 6.49 mujs lua python perl ruby | 0.66 0.03 0.00
test-prop-write.js 4.20 4.18 4.29 4.15 4.45 4.90 5.63 4.77 mujs lua python perl ruby | 1.87 0.03 0.00
test-reg-readwrite-object.js 3.17 3.19 3.16 3.18 3.76 10.59 7.05 7.40 mujs lua python perl ruby | 0.35 0.02 0.00
test-reg-readwrite-plain.js 2.04 2.02 2.04 2.04 2.55 9.33 4.71 4.89 mujs lua python perl ruby | 0.36 0.04 0.00
test-regexp-case-insensitive.js 24.31 24.39 23.24 23.27 23.25 23.34 24.17 24.15 mujs lua python perl ruby | 0.23 0.02 n/a
test-regexp-string-parse.js 9.68 9.71 9.55 9.43 10.51 12.69 12.53 12.54 mujs lua python perl ruby | n/a 0.08 n/a
test-string-array-concat.js 6.59 6.48 7.01 6.86 6.46 7.70 23.97 23.21 mujs lua python perl ruby | 1.97 0.44 0.86
test-string-charlen-ascii.js 1.36 1.30 1.35 1.38 5.27 5.34 5.36 5.37 mujs lua python perl ruby | 0.33 0.02 n/a
test-string-charlen-nonascii.js 2.80 2.79 2.80 2.80 3.95 3.96 3.92 3.89 mujs lua python perl ruby | 0.33 0.02 n/a
test-string-compare.js 3.77 3.75 3.94 3.87 3.81 4.65 6.11 6.11 mujs lua python perl ruby | 4.49 0.86 0.18
test-string-decodeuri.js 3.66 3.71 3.57 3.57 3.59 4.20 4.09 4.16 mujs lua python perl ruby | 2.08 3.92 n/a
test-string-encodeuri.js 4.04 4.05 4.17 4.13 4.35 6.31 6.26 6.26 mujs lua python perl ruby | 6.91 41.41 n/a
test-string-garbage.js 8.52 8.49 8.49 8.46 8.70 9.39 9.50 9.24 mujs lua python perl ruby | 1.00 0.02 1.33
test-string-intern-grow-short.js 21.18 21.08 20.82 20.64 7.27 7.70 13.29 12.44 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-grow-short2.js 7.50 7.57 7.38 7.32 7.35 7.76 13.18 12.49 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-grow.js 38.85 39.29 39.60 39.62 4.93 4.98 5.59 5.50 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-grow2.js 3.30 3.29 3.29 3.23 5.05 5.19 5.76 5.73 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-match-short.js 2.70 2.69 2.69 2.75 2.25 2.30 2.35 2.26 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-match.js 0.38 0.37 0.37 0.39 0.97 1.03 1.06 1.05 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-miss-short.js 5.49 5.51 5.47 5.49 5.11 5.25 5.50 5.40 mujs lua python perl ruby | n/a n/a n/a
test-string-intern-miss.js 1.29 1.28 1.31 1.33 2.57 2.60 2.80 2.73 mujs lua python perl ruby | n/a n/a n/a
test-string-plain-concat.js 1.03 1.07 1.02 1.09 4.05 4.14 4.10 4.12 mujs lua python perl ruby | 0.30 0.03 0.65
test-string-uppercase.js 2.23 2.16 2.18 2.15 2.58 3.31 3.36 3.48 mujs lua python perl ruby | 1.62 0.09 n/a
test-try-catch-nothrow.js 2.91 2.93 3.01 3.05 2.56 2.80 2.37 2.43 mujs lua python perl ruby | 0.31 0.36 n/a
test-try-catch-throw.js 39.17 38.58 39.09 39.14 37.91 38.05 38.45 38.32 mujs lua python perl ruby | 133.09 8.01 n/a
test-try-finally-nothrow.js 3.74 3.73 3.64 3.65 2.86 3.31 3.10 3.21 mujs lua python perl ruby | 0.29 0.53 n/a
test-try-finally-throw.js 49.13 48.05 48.98 48.67 45.77 45.74 45.25 45.08 mujs lua python perl ruby | 134.35 10.04 n/a
Last edited by Sami Vaarala, 2017-09-23 01:46:40