Go VS Haxe benchmarks

Current benchmark data was generated on Fri Aug 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
haxe 1.hx 1290ms 13ms 144.0MB 1470ms 67ms haxe/cpp 4.3.6
go 1.go 1726ms 16ms 51.9MB 1707ms 10ms tinygo 0.38.0
go 1-m.go 2343ms 11ms 41.9MB 5213ms 33ms go 1.24.5
haxe 2.hx 4336ms 13ms 495.3MB 4867ms 253ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 48.6MB 5457ms 423ms haxe/hl/c 4.3.6
haxe 2.hx timeout 0.0ms 83.0MB 5003ms 683ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 51.1MB 7750ms 430ms haxe/hl/jit 1.16.0
haxe 2.hx timeout 0.0ms 131.0MB 7297ms 770ms haxe/hl/jit 1.16.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 88ms 0.4ms 25.6MB 77ms 10ms haxe/cpp 4.3.6
go 1.go 152ms 0.5ms 5.0MB 140ms 0ms tinygo 0.38.0
go 1-m.go 207ms 1.7ms 8.3MB 367ms 7ms go 1.24.5
haxe 2.hx 380ms 5.8ms 58.3MB 410ms 20ms haxe/cpp 4.3.6
haxe 1.hx 640ms 2.4ms 8.7MB 613ms 43ms haxe/hl/c 4.3.6
haxe 1.hx 671ms 4.4ms 11.4MB 727ms 57ms haxe/hl/jit 1.16.0
haxe 2.hx 930ms 3.9ms 13.6MB 817ms 157ms haxe/hl/c 4.3.6
haxe 2.hx 940ms 11ms 25.0MB 910ms 170ms haxe/hl/jit 1.16.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 660ms 61ms 15.5MB 2573ms 0ms go 1.24.5
go 1.go timeout 0.0ms 13.3MB 2440ms 17047ms tinygo 0.38.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 44ms 7.8ms 7.5MB 147ms 0ms go 1.24.5
go 1-m.go 672ms 69ms 4.4MB 307ms 2230ms tinygo 0.38.0

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 118ms 0.3ms 10.5MB 110ms 0ms go 1.24.5

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 33ms 0.4ms 8.2MB 23ms 0ms go 1.24.5

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 724ms 0.6ms 5.5MB 2807ms 0ms go 1.24.5
go 3-m.go 725ms 2.0ms 3.0MB 2653ms 50ms tinygo 0.38.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 75ms 0.4ms 5.5MB 210ms 0ms go 1.24.5
go 3-m.go 103ms 4.4ms 3.0MB 190ms 33ms tinygo 0.38.0

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 118ms 1.0ms 7.5MB 380ms 0ms go 1.24.5
haxe 1.hx 2378ms 10ms 25.6MB 2270ms 190ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 3.1MB 4333ms 880ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 3.6MB 4383ms 850ms haxe/hl/jit 1.16.0

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 17ms 1.0ms 7.5MB 30ms 0ms go 1.24.5
haxe 1.hx 251ms 2.7ms 25.6MB 220ms 30ms haxe/cpp 4.3.6
haxe 1.hx 667ms 6.6ms 3.5MB 577ms 103ms haxe/hl/c 4.3.6
haxe 1.hx 698ms 6.6ms 3.6MB 617ms 107ms haxe/hl/jit 1.16.0

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 0.8ms 0.1ms 0.3MB 0ms 0ms tinygo 0.38.0
go 1.go 1.5ms 0.1ms 3.4MB 0ms 0ms go 1.24.5
haxe 1.hx 1.9ms 0.2ms 2.9MB 0ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 2.3ms 0.3ms 4.4MB 0ms 0ms haxe/cpp 4.3.6
haxe 1.hx 3.4ms 0.4ms 2.9MB 0ms 0ms haxe/hl/jit 1.16.0

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-http2.go 119ms 2.9ms 56.1MB 333ms 80ms go 1.24.5
go 1-m.go 378ms 12ms 172.9MB 707ms 580ms go 1.24.5
go 2-m.go 401ms 6.5ms 170.4MB 683ms 660ms go 1.24.5

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-http2.go 22ms 13ms 23.8MB 65ms 20ms go 1.24.5
go 2-m.go 24ms 27ms 26.6MB 70ms 90ms go 1.24.5
go 1-m.go 70ms 2.8ms 36.9MB 90ms 100ms go 1.24.5

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 2-ffi.go 45ms 2.2ms 39.1MB 37ms 3ms go 1.24.5
go 1.go 139ms 1.8ms 18.6MB 130ms 0ms go 1.24.5

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 2-ffi.go 259ms 16ms 149.3MB 240ms 60ms go 1.24.5
go 1.go 751ms 4.5ms 103.6MB 737ms 20ms go 1.24.5

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 7-m.go 676ms 5.9ms 39.5MB 2397ms 27ms go 1.24.5

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 7-m.go 131ms 0.3ms 24.5MB 350ms 20ms go 1.24.5

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 119ms 1.2ms 3.5MB 110ms 0ms go 1.24.5
go 3.go 134ms 2.9ms 0.4MB 127ms 0ms tinygo 0.38.0
haxe 1.hx 134ms 1.8ms 20.4MB 120ms 7ms haxe/cpp 4.3.6
haxe 1.hx 135ms 0.3ms 3.3MB 127ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 157ms 3.8ms 3.8MB 147ms 0ms haxe/hl/jit 1.16.0

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 378ms 5.6ms 25.5MB 363ms 10ms haxe/cpp 4.3.6
go 3.go 385ms 3.2ms 0.4MB 373ms 0ms tinygo 0.38.0
go 3.go 387ms 4.2ms 3.5MB 380ms 0ms go 1.24.5
haxe 1.hx 398ms 6.1ms 3.1MB 387ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 459ms 7.2ms 3.8MB 450ms 0ms haxe/hl/jit 1.16.0

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 50ms 1.0ms 3.5MB 40ms 0ms go 1.24.5
haxe 1.hx 63ms 0.7ms 12.3MB 50ms 0ms haxe/cpp 4.3.6
go 3.go 65ms 2.2ms 0.3MB 60ms 0ms tinygo 0.38.0
haxe 1.hx 67ms 0.6ms 3.0MB 60ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 77ms 0.7ms 3.6MB 70ms 0ms haxe/hl/jit 1.16.0

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 2666ms 9.4ms 7.7MB 2660ms 0ms go 1.24.5
go 1.go 3575ms 6.5ms 3.3MB 3563ms 0ms tinygo 0.38.0

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 113ms 1.1ms 3.6MB 107ms 0ms go 1.24.5
go 1.go 152ms 3.1ms 0.4MB 147ms 0ms tinygo 0.38.0

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 908ms 5.7ms 94.9MB 1010ms 40ms haxe/cpp 4.3.6
go 1.go 1027ms 9.5ms 35.4MB 1010ms 0ms tinygo 0.38.0
go 2.go 1327ms 3.3ms 51.9MB 1307ms 10ms tinygo 0.38.0
go 1-m.go 1436ms 4.6ms 35.2MB 3040ms 37ms go 1.24.5
go 2-m.go 1649ms 17ms 40.9MB 3633ms 33ms go 1.24.5
haxe 1.hx timeout 0.0ms 32.5MB 4877ms 553ms haxe/hl/c 4.3.6
haxe 1.hx timeout 0.0ms 55.1MB 5960ms 490ms haxe/hl/jit 1.16.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
haxe 1.hx 170ms 4.0ms 26.6MB 173ms 10ms haxe/cpp 4.3.6
go 1.go 206ms 2.0ms 11.6MB 193ms 0ms tinygo 0.38.0
go 2.go 261ms 3.0ms 15.4MB 250ms 0ms tinygo 0.38.0
go 1-m.go 327ms 1.0ms 12.2MB 660ms 20ms go 1.24.5
go 2-m.go 368ms 1.6ms 14.0MB 770ms 27ms go 1.24.5
haxe 1.hx 1306ms 1.8ms 10.8MB 1253ms 140ms haxe/hl/c 4.3.6
haxe 1.hx 1322ms 7.0ms 20.2MB 1330ms 127ms haxe/hl/jit 1.16.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 349ms 3.6ms 0.3MB 340ms 0ms tinygo 0.38.0
go 1.go 350ms 1.9ms 3.5MB 340ms 0ms go 1.24.5
haxe 2.hx 856ms 3.6ms 3.0MB 847ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 1084ms 8.6ms 3.0MB 1073ms 0ms haxe/hl/c 4.3.6
haxe 3.hx 1407ms 30ms 25.6MB 1560ms 30ms haxe/cpp 4.3.6
haxe 2.hx 2414ms 4.4ms 3.6MB 2403ms 0ms haxe/hl/jit 1.16.0
haxe 1.hx 2476ms 3.3ms 3.6MB 2467ms 0ms haxe/hl/jit 1.16.0
haxe 1.hx timeout 0.0ms 4.4MB 4990ms 0ms haxe/cpp 4.3.6
haxe 2.hx timeout 0.0ms 4.5MB 4990ms 0ms haxe/cpp 4.3.6
haxe 3.hx timeout 0.0ms 3.2MB 3920ms 1573ms haxe/hl/c 4.3.6
haxe 3.hx timeout 0.0ms 3.9MB 4133ms 1323ms haxe/hl/jit 1.16.0

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 37ms 1.3ms 0.3MB 30ms 0ms tinygo 0.38.0
go 1.go 38ms 0.1ms 3.5MB 30ms 0ms go 1.24.5
haxe 2.hx 88ms 0.2ms 3.0MB 80ms 0ms haxe/hl/c 4.3.6
haxe 1.hx 111ms 2.9ms 3.1MB 103ms 0ms haxe/hl/c 4.3.6
haxe 3.hx 153ms 2.6ms 25.6MB 147ms 10ms haxe/cpp 4.3.6
haxe 2.hx 244ms 1.1ms 3.6MB 237ms 0ms haxe/hl/jit 1.16.0
haxe 1.hx 253ms 2.2ms 3.6MB 243ms 0ms haxe/hl/jit 1.16.0
haxe 2.hx 674ms 7.0ms 4.4MB 663ms 0ms haxe/cpp 4.3.6
haxe 3.hx 676ms 2.5ms 3.3MB 530ms 203ms haxe/hl/c 4.3.6
haxe 3.hx 795ms 13ms 3.8MB 643ms 210ms haxe/hl/jit 1.16.0
haxe 1.hx 812ms 5.7ms 4.4MB 803ms 0ms haxe/cpp 4.3.6

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 310ms 6.6ms 71.7MB 297ms 0ms go 1.24.5
go 1.go 312ms 4.6ms 39.4MB 300ms 0ms tinygo 0.38.0
go 2.go 470ms 3.8ms 20.0MB 460ms 0ms tinygo 0.38.0
go 2.go 787ms 2.0ms 21.8MB 777ms 10ms go 1.24.5

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 63ms 1.9ms 21.6MB 57ms 0ms go 1.24.5
go 1.go 67ms 2.7ms 10.1MB 60ms 0ms tinygo 0.38.0
go 2.go 119ms 3.3ms 4.1MB 110ms 0ms tinygo 0.38.0
go 2.go 194ms 4.5ms 7.1MB 183ms 0ms go 1.24.5

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 1120ms 3.1ms 10.7MB 1103ms 7ms go 1.24.5

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 268ms 3.1ms 8.6MB 257ms 0ms go 1.24.5

regex-redux

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go timeout 0.0ms 120.5MB 4980ms 47ms go 1.24.5
go 3.go timeout 0.0ms 83.9MB 4973ms 10ms tinygo 0.38.0

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 1781ms 5.2ms 20.3MB 1773ms 10ms go 1.24.5
go 3.go 2266ms 7.5ms 22.3MB 2247ms 0ms tinygo 0.38.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 91ms 1.7ms 5.2MB 83ms 0ms go 1.24.5

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 25ms 0.2ms 5.2MB 20ms 0ms go 1.24.5

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 1906ms 16ms 5.4MB 7413ms 3ms go 1.24.5
go 1.go 3693ms 15ms 5.6MB 3690ms 0ms go 1.24.5
haxe 1.hx 3897ms 3.5ms 3.4MB 3883ms 0ms haxe/hl/c 4.3.6
go 1.go timeout 0.0ms 0.5MB 4990ms 0ms tinygo 0.38.0
haxe 1.hx timeout 0.0ms 7.0MB 4990ms 0ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 3.9MB 4990ms 0ms haxe/hl/jit 1.16.0

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 480ms 1.0ms 5.5MB 1843ms 0ms go 1.24.5
go 1.go 924ms 10ms 3.5MB 917ms 0ms go 1.24.5
haxe 1.hx 987ms 3.6ms 3.2MB 977ms 0ms haxe/hl/c 4.3.6
go 1.go 1397ms 0.7ms 0.4MB 1390ms 0ms tinygo 0.38.0
haxe 1.hx 2398ms 1.7ms 6.5MB 2387ms 0ms haxe/cpp 4.3.6
haxe 1.hx timeout 0.0ms 3.8MB 4990ms 0ms haxe/hl/jit 1.16.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 125ms 1.2ms 5.6MB 457ms 0ms go 1.24.5
go 1.go 233ms 5.1ms 3.5MB 223ms 0ms go 1.24.5
haxe 1.hx 250ms 1.8ms 3.0MB 240ms 0ms haxe/hl/c 4.3.6
go 1.go 351ms 0.8ms 0.4MB 340ms 0ms tinygo 0.38.0
haxe 1.hx 602ms 0.3ms 5.4MB 590ms 0ms haxe/cpp 4.3.6
haxe 1.hx 2306ms 17ms 3.8MB 2297ms 0ms haxe/hl/jit 1.16.0