All Javascript benchmarks

Current benchmark data was generated on Fri Dec 09 2022, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][2 cores] Intel(R) Xeon(R) Platinum 8272CL CPU @ 2.60GHz (Model 85)

* -m in a file name stands for multi-threading or multi-processing

* -i in a file name stands for direct intrinsics usage. (Usage of simd intrinsics via libraries is not counted)

* -ffi in a file name stands for non-stdlib FFI usage

* (You may find time < time(user) + time(sys) for some non-parallelized programs, the overhead is from GC or JIT compiler, which are allowed to take advantage of multi-cores as that's more close to real-world scenarios.)

binarytrees

Input: 18

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 1355ms 3.8ms 236.5MB 1680ms 67ms bun 0.3.0
1.js 4135ms 58ms 270.3MB 2983ms 1417ms node 19.2.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 131ms 2.5ms 102.3MB 113ms 17ms bun 0.3.0
1.js 209ms 4.3ms 71.7MB 190ms 27ms node 19.2.0

coro-prime-sieve

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 2491ms 19ms 83.4MB 2537ms 43ms node 19.2.0
1.js 3736ms 3.6ms 115.3MB 3750ms 40ms bun 0.3.0

Input: 1000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 236ms 1.8ms 64.0MB 210ms 20ms node 19.2.0
1.js 267ms 5.2ms 107.5MB 277ms 17ms bun 0.3.0

helloworld

Input: QwQ

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 18ms 1.0ms 52.6MB 3ms 7ms bun 0.3.0
1.js 59ms 2.4ms 44.1MB 38ms 8ms node 19.2.0

http-server

Input: 3000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.bun.js 145ms 8.5ms 80.5MB 73ms 63ms bun 0.3.0
1.js 3988ms 80ms 161.4MB 1810ms 420ms node 19.2.0

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.bun.js 92ms 6.0ms 71.3MB 30ms 27ms bun 0.3.0
1.js 404ms 8.2ms 72.7MB 370ms 87ms node 19.2.0

json-serde

Input: sample 5000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 177ms 2.7ms 75.7MB 140ms 33ms node 19.2.0
1.js 365ms 2.9ms 274.5MB 380ms 73ms bun 0.3.0

Input: canada 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 1160ms 5.0ms 282.2MB 1117ms 123ms node 19.2.0
1.js 2584ms 19ms 1182.3MB 2277ms 553ms bun 0.3.0

lru

Input: 1000 1000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.js 380ms 6.1ms 57.7MB 357ms 13ms node 19.2.0
1.js 609ms 7.6ms 139.4MB 593ms 30ms bun 0.3.0
2.js 769ms 2.7ms 107.6MB 770ms 13ms bun 0.3.0
1.js 1025ms 1.2ms 63.6MB 1000ms 17ms node 19.2.0

Input: 1000 3000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.js 983ms 13ms 65.3MB 953ms 20ms node 19.2.0
1.js 1739ms 12ms 164.9MB 1763ms 40ms bun 0.3.0
2.js 2252ms 44ms 117.9MB 2220ms 27ms bun 0.3.0
1.js 2919ms 0.4ms 63.6MB 2897ms 10ms node 19.2.0

Input: 100 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
2.js 217ms 5.4ms 51.0MB 203ms 7ms node 19.2.0
1.js 312ms 2.8ms 116.9MB 293ms 30ms bun 0.3.0
1.js 410ms 2.8ms 52.1MB 400ms 3ms node 19.2.0
2.js 418ms 0.9ms 100.5MB 420ms 20ms bun 0.3.0

merkletrees

Input: 17

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 815ms 13ms 154.7MB 893ms 43ms bun 0.3.0
1.js 911ms 15ms 124.3MB 920ms 67ms node 19.2.0

Input: 15

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 187ms 3.3ms 107.4MB 167ms 23ms bun 0.3.0
1.js 271ms 3.1ms 91.9MB 243ms 43ms node 19.2.0

nbody

Input: 5000000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
6.js 703ms 2.6ms 49.1MB 690ms 7ms node 19.2.0
6.js 1044ms 0.9ms 68.3MB 1030ms 10ms bun 0.3.0

Input: 500000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
6.js 125ms 0.6ms 63.7MB 113ms 10ms bun 0.3.0
6.js 130ms 1.2ms 49.3MB 117ms 10ms node 19.2.0

secp256k1

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 3692ms 5.5ms 102.2MB 3703ms 33ms bun 0.3.0
1.js 3900ms 2.9ms 55.1MB 3897ms 13ms node 19.2.0

Input: 500

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
1.js 955ms 4.1ms 100.8MB 953ms 20ms bun 0.3.0
1.js 1036ms 3.8ms 52.3MB 1030ms 10ms node 19.2.0

pidigits

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.js timeout 0.0ms 0.0MB 0ms 0ms node 19.2.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
3.js 1582ms 3.3ms 65.5MB 1573ms 17ms node 19.2.0

spectral-norm

Input: 8000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
6-m.js 2821ms 18ms 77.9MB 5267ms 33ms node 19.2.0

Input: 4000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
6-m.js 891ms 4.6ms 77.3MB 1543ms 33ms node 19.2.0

Input: 2000

code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
6.js 461ms 4.6ms 75.7MB 603ms 40ms node 19.2.0