Odin VS Javascript benchmarks

Current benchmark data was generated on Sun Jun 01 2025, full log can be found HERE

CONTRIBUTIONS are WELCOME!

[x86_64][4 cores] AMD EPYC 7763 64-Core Processor (Model 1)

* -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

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1-m.js 907ms 13ms 181.8MB 1350ms 187ms bun 1.2.15
javascript 1.js 1049ms 5.1ms 469.9MB 970ms 217ms node 24.1.0
odin 1.odin 2307ms 6.3ms 49.5MB 2280ms 13ms odin 2024

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 1.js 100ms 1.6ms 77.6MB 80ms 27ms bun 1.2.15
javascript 1.js 123ms 1.2ms 80.3MB 127ms 20ms node 24.1.0
odin 1.odin 221ms 4.9ms 7.5MB 207ms 0ms odin 2024

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 1.1ms 0.0ms 1.6MB 0ms 0ms odin 2024
javascript 1.js 12ms 0.4ms 31.5MB 0ms 0ms bun 1.2.15
javascript 1.js 30ms 0.6ms 49.8MB 18ms 6ms node 24.1.0

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 157ms 1.1ms 1.6MB 150ms 0ms odin 2024
javascript 2.js 304ms 2.7ms 64.1MB 293ms 13ms node 24.1.0
javascript 1.js 566ms 6.6ms 62.7MB 553ms 7ms node 24.1.0
javascript 2.js 634ms 5.2ms 123.1MB 710ms 43ms bun 1.2.15
javascript 1.js 830ms 15ms 106.3MB 903ms 87ms bun 1.2.15

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 458ms 3.6ms 1.6MB 447ms 0ms odin 2024
javascript 2.js 833ms 3.9ms 71.4MB 820ms 17ms node 24.1.0
javascript 1.js 1610ms 3.9ms 69.4MB 1593ms 10ms node 24.1.0
javascript 2.js 1783ms 10.0ms 124.1MB 1957ms 77ms bun 1.2.15
javascript 1.js 2362ms 4.9ms 106.4MB 2650ms 160ms bun 1.2.15

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 70ms 0.2ms 1.6MB 60ms 0ms odin 2024
javascript 2.js 164ms 1.8ms 58.7MB 153ms 10ms node 24.1.0
javascript 1.js 167ms 0.2ms 59.9MB 160ms 3ms node 24.1.0
javascript 1.js 318ms 5.1ms 130.3MB 357ms 77ms bun 1.2.15
javascript 2.js 347ms 3.8ms 125.4MB 380ms 47ms bun 1.2.15

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 286ms 0.5ms 4.6MB 280ms 0ms odin 2024

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 14ms 0.2ms 1.6MB 10ms 0ms odin 2024

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 354ms 2.5ms 1.5MB 343ms 0ms odin 2024
odin 1-i.odin 356ms 1.4ms 1.5MB 350ms 0ms odin 2024
javascript 6.js 456ms 3.2ms 57.9MB 447ms 7ms node 24.1.0
javascript 6.js 597ms 2.9ms 45.0MB 600ms 0ms bun 1.2.15

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1-i.odin 38ms 0.3ms 1.5MB 30ms 0ms odin 2024
odin 1.odin 39ms 0.5ms 1.5MB 30ms 0ms odin 2024
javascript 6.js 78ms 2.2ms 58.2MB 67ms 7ms node 24.1.0
javascript 6.js 80ms 0.6ms 45.0MB 90ms 3ms bun 1.2.15

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 267ms 7.1ms 40.5MB 253ms 7ms odin 2024
odin 2.odin 722ms 37ms 6.5MB 713ms 0ms odin 2024

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 56ms 4.6ms 11.3MB 47ms 0ms odin 2024
odin 2.odin 179ms 8.0ms 2.8MB 170ms 0ms odin 2024

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 6-m.js 2185ms 14ms 119.3MB 8240ms 53ms node 24.1.0
odin 1.odin 3598ms 2.4ms 2.9MB 3590ms 0ms odin 2024

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
javascript 6-m.js 653ms 1.5ms 117.6MB 2320ms 57ms node 24.1.0
odin 1.odin 902ms 1.5ms 2.3MB 890ms 0ms odin 2024

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
odin 1.odin 227ms 0.9ms 1.9MB 220ms 0ms odin 2024
javascript 6-m.js 270ms 2.9ms 117.4MB 843ms 47ms node 24.1.0