Skip to content

Latest commit

 

History

History
129 lines (118 loc) · 21.2 KB

Performance140.md

File metadata and controls

129 lines (118 loc) · 21.2 KB

Duktape 1.4.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
1.4.0
json
duk
1.4.0
 
duk
1.3.1
json
duk
1.2.5
 
duk
1.1.3
 
duk
1.0.2
 
mujslua
5.1
pythonperlrubyrhinonodeluajit
test-add-fastint.js0.090.080.100.150.170.180.40n/an/an/an/a0.290.02n/a
test-add-float.js0.080.080.110.140.170.180.40n/an/an/an/a0.280.02n/a
test-add-nan-fastint.js0.080.080.120.160.170.180.40n/an/an/an/a0.270.02n/a
test-add-nan.js0.080.070.110.150.170.180.41n/an/an/an/a0.270.02n/a
test-array-read.js2.172.132.302.642.942.99226.580.951.773.271.460.370.030.00
test-array-write.js2.562.552.423.1916.6315.71240.411.132.463.274.061.080.050.00
test-assign-add.js5.265.298.7911.0810.6111.4435.443.2313.8725.1010.173.650.020.00
test-assign-addto-nan.js1.411.432.623.592.752.907.35n/an/an/an/a0.340.23n/a
test-assign-addto.js5.285.2511.3714.9510.7111.5235.293.2216.3624.1110.233.610.830.93
test-assign-const-int.js2.572.542.874.729.7710.399.692.135.5422.364.080.330.030.00
test-assign-const.js3.994.002.854.7411.0411.549.782.125.5122.834.050.320.020.00
test-assign-literal.js4.324.367.089.2810.8811.649.992.6111.99n/a4.480.310.030.00
test-assign-proplhs-reg.js3.773.663.964.124.673.862.41n/an/an/an/a1.72n/an/a
test-assign-proprhs.js4.264.184.665.615.485.572.48n/an/an/an/a0.880.02n/a
test-assign-reg.js2.882.875.309.655.395.558.882.275.8323.424.130.340.030.00
test-base64-decode-whitespace.js1.911.8911.0410.7410.8910.81n/an/a8.77n/an/an/an/an/a
test-base64-decode.js1.531.545.465.545.975.34n/an/a8.76n/an/an/an/an/a
test-base64-encode.js1.851.8817.5217.1817.3017.28n/an/a17.23n/an/an/an/an/a
test-bitwise-ops.js0.750.760.861.135.095.243.36n/an/an/an/a7.840.02n/a
test-break-fast.js1.671.701.481.841.882.031.20n/an/an/an/a0.300.04n/a
test-break-slow.js7.727.7911.2111.8311.4811.492.59n/an/an/an/a0.300.54n/a
test-buffer-nodejs-read.js2.742.782.60n/an/an/an/an/an/an/an/an/a0.03n/a
test-buffer-nodejs-write.js3.033.053.29n/an/an/an/an/an/an/an/an/a0.05n/a
test-buffer-object-read.js2.892.722.6518.6619.1119.82n/an/an/an/an/an/an/an/a
test-buffer-object-write.js3.033.083.3122.6223.3320.32n/an/an/an/an/an/an/an/a
test-buffer-plain-read.js2.212.262.162.462.722.75n/an/an/an/an/an/an/an/a
test-buffer-plain-write.js1.901.941.752.355.013.20n/an/an/an/an/an/an/an/a
test-call-basic-1.js9.159.0112.0012.2314.3113.996.562.185.257.773.391.390.030.00
test-call-basic-2.js9.119.0212.0112.2814.5014.024.81n/an/an/an/a0.640.03n/a
test-call-basic-3.js14.6514.6020.0019.9721.2321.2212.42n/an/an/an/a0.610.12n/a
test-call-basic-4.js35.1735.6045.0950.1150.2149.8336.46n/an/an/an/a1.430.53n/a
test-call-native.js14.1413.5918.8218.7020.7520.5017.13n/an/an/an/a1.473.71n/a
test-compile-mandel-nofrac.js13.1713.0413.6816.8918.4118.255.87n/an/an/an/a7.100.04n/a
test-compile-mandel.js16.2216.3216.6019.8021.5921.465.85n/an/an/an/a7.010.07n/a
test-compile-short.js9.959.9810.139.9910.9710.622.11n/an/an/an/a3.640.17n/a
test-continue-fast.js2.172.221.952.512.702.811.96n/an/an/an/a0.510.05n/a
test-continue-slow.js8.428.4411.7812.5212.4312.523.35n/an/an/an/a0.540.57n/a
test-empty-loop.js2.292.382.373.125.735.905.831.004.573.413.320.660.070.16
test-fib.js7.907.618.609.179.829.893.301.332.416.431.521.180.160.27
test-global-lookup.js10.7110.2311.2911.5011.7111.274.11n/an/an/an/a1.140.02n/a
test-hello-world.js0.000.000.000.000.000.000.000.000.000.000.000.220.020.00
test-hex-decode.js3.603.615.345.329.389.36n/an/a12.51n/an/an/an/an/a
test-hex-encode.js2.802.826.066.006.696.72n/an/a1.43n/an/an/an/an/a
test-jc-serialize-indented.js3.6423.0334.1837.4540.7040.49n/an/an/an/an/an/an/an/a
test-jc-serialize.js2.4820.9328.5431.3734.7636.39n/an/an/an/an/an/an/an/a
test-json-parse-hex.js3.363.386.616.648.338.33n/an/an/an/an/an/an/an/a
test-json-parse-integer.js3.944.014.064.094.064.1220.95n/a0.07n/an/a2.260.32n/a
test-json-parse-number.js5.195.215.105.045.255.272.46n/a0.29n/an/a1.560.19n/a
test-json-parse-string.js5.475.695.6230.0830.0430.0144.72n/an/an/an/a22.486.08n/a
test-json-serialize-fastpath-loop.js3.6419.4532.3835.7040.5138.3712.57n/an/an/an/a111.9732.99n/a
test-json-serialize-hex.js1.451.492.7824.3523.7522.47n/an/an/an/an/an/an/an/a
test-json-serialize-indented-deep100.js2.392.303.623.823.893.871.43n/an/an/an/a40.941.05n/a
test-json-serialize-indented-deep25.js3.3027.2544.8047.4450.6148.5910.29n/an/an/an/a61.1013.91n/a
test-json-serialize-indented-deep500.js1.451.442.372.442.492.41n/an/an/an/an/a1246.260.52n/a
test-json-serialize-indented.js6.2546.8369.9476.1682.0282.0514.79n/an/an/an/a25.4623.71n/a
test-json-serialize-jsonrpc-message.js1.972.523.977.858.027.75n/an/an/an/an/an/an/an/a
test-json-serialize-nofrac.js0.694.830.696.987.447.291.55n/an/an/an/a4.140.61n/a
test-json-serialize-slowpath-loop.js5.815.758.589.4410.3010.03n/an/an/an/an/a11.922.97n/a
test-json-serialize.js6.2410.396.3012.4712.9012.702.17n/a0.51n/an/a5.400.70n/a
test-json-string-bench.js5.265.255.465.426.726.5751.06n/an/an/an/a1.980.25n/a
test-json-string-stringify.js5.145.196.4717.7517.8217.0910.72n/a0.48n/an/a18.395.98n/a
test-jx-serialize-indented.js3.7222.6434.0936.0639.8139.56n/an/an/an/an/an/an/an/a
test-jx-serialize.js2.5120.9628.3230.4434.0933.28n/an/an/an/an/an/an/an/a
test-mandel.js4.364.344.755.886.346.7113.92n/an/an/an/a1.600.21n/a
test-prop-read.js4.894.805.256.186.436.503.761.032.444.8511.160.670.020.00
test-prop-write.js4.284.214.444.865.684.793.731.162.454.9614.771.900.030.00
test-reg-readwrite-object.js3.313.227.7910.937.187.487.811.754.8029.304.000.360.020.00
test-reg-readwrite-plain.js2.072.065.079.424.904.947.751.764.7932.324.030.380.010.00
test-regexp-case-insensitive.js23.4423.4223.3723.5024.2824.390.00n/an/an/an/a0.230.01n/a
test-regexp-string-parse.js9.759.5210.6612.8312.6812.74n/an/a0.51n/an/an/a0.08n/a
test-string-array-concat.js6.686.796.497.8324.2223.52261.362.112.847.447.841.990.390.86
test-string-charlen-ascii.js1.361.395.315.325.335.334.70n/an/an/an/a0.350.02n/a
test-string-charlen-nonascii.js2.822.803.923.943.953.967.14n/an/an/an/a0.340.02n/a
test-string-compare.js3.913.823.824.616.086.11731.422.814.8916.515.374.430.870.13
test-string-decodeuri.js3.593.593.584.154.084.162.07n/an/an/an/a2.113.90n/a
test-string-encodeuri.js4.094.074.286.236.316.243.63n/an/an/an/a6.9140.88n/a
test-string-intern-grow-short.js20.9220.747.187.7313.3712.34n/an/an/an/an/an/an/an/a
test-string-intern-grow-short2.js7.357.357.277.8113.3212.45n/an/an/an/an/an/an/an/a
test-string-intern-grow.js39.2239.434.984.935.575.56n/an/an/an/an/an/an/an/a
test-string-intern-grow2.js3.383.235.095.175.795.76n/an/an/an/an/an/an/an/a
test-string-intern-match-short.js2.722.752.292.352.392.36n/an/an/an/an/an/an/an/a
test-string-intern-match.js0.360.360.961.001.031.03n/an/an/an/an/an/an/an/a
test-string-intern-miss-short.js5.555.675.115.235.505.52n/an/an/an/an/an/an/an/a
test-string-intern-miss.js1.271.272.532.592.802.75n/an/an/an/an/an/an/an/a
test-string-plain-concat.js1.041.074.134.164.264.151.030.600.000.410.810.300.020.63
test-string-uppercase.js2.212.222.653.543.353.484.50n/a1.28n/an/a1.670.09n/a
test-try-catch-nothrow.js3.053.042.572.762.392.452.22n/an/an/an/a0.300.33n/a
test-try-catch-throw.js41.5039.6239.8639.9939.2938.2020.53n/an/an/an/a133.428.02n/a
test-try-finally-nothrow.js3.633.682.813.323.123.182.06n/an/an/an/a0.320.54n/a
test-try-finally-throw.js51.0949.4046.1245.9245.5845.4122.90n/an/an/an/a130.8310.05n/a