Go VS Java benchmarks

Current benchmark data was generated on Mon Feb 06 2023, 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

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2.java 741ms 67ms 604.5MB 693ms 140ms openjdk 20
java 2.java 785ms 70ms 601.6MB 723ms 153ms openjdk 19
java 2.java 929ms 77ms 665.9MB 940ms 233ms graal/jvm 17.0.6
java 2.java 1459ms 59ms 1085.7MB 960ms 723ms openjdk/zgc 19
go 1.go 3238ms 18ms 44.6MB 4600ms 63ms go 1.19.5
go 1.go 4368ms 14ms 39.4MB 4343ms 10ms tinygo 0.25.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 2.java 187ms 22ms 108.8MB 167ms 37ms openjdk 20
java 2.java 192ms 10ms 111.6MB 187ms 33ms openjdk 19
java 2.java 204ms 15ms 162.8MB 223ms 60ms graal/jvm 17.0.6
go 1.go 277ms 2.4ms 8.2MB 353ms 10ms go 1.19.5
java 2.java 346ms 6.2ms 239.6MB 207ms 167ms openjdk/zgc 19
go 1.go 391ms 3.0ms 6.6MB 383ms 0ms tinygo 0.25.0

coro-prime-sieve

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 909ms 184ms 13.4MB 1750ms 3ms go 1.19.5
go 1.go 2254ms 7.2ms 253.7MB 2167ms 67ms tinygo 0.25.0
java 1-m.java 3410ms 117ms 198.3MB 6373ms 130ms openjdk 19
java 1-m.java 4472ms 132ms 924.9MB 7827ms 667ms openjdk/zgc 19
java 1.java timeout 0.0ms 143.3MB 9577ms 97ms openjdk 20

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-m.go 64ms 6.1ms 5.4MB 103ms 0ms go 1.19.5
go 1.go 306ms 2.0ms 65.6MB 277ms 13ms tinygo 0.25.0
java 1-m.java 854ms 61ms 112.8MB 1507ms 50ms openjdk 19
java 1-m.java 907ms 79ms 112.3MB 1597ms 60ms openjdk 20
java 1-m.java 1004ms 94ms 238.1MB 1497ms 207ms openjdk/zgc 19

edigits

Input: 250001

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 168ms 3.0ms 8.3MB 153ms 3ms go 1.19.5
java 1-m.java 810ms 87ms 202.8MB 1410ms 70ms openjdk 20
java 1-m.java 820ms 13ms 207.6MB 1417ms 63ms openjdk 19
java 1-m.java 878ms 28ms 293.5MB 1490ms 110ms graal/jvm 17.0.6
java 1-m.java 1095ms 65ms 443.9MB 1563ms 350ms openjdk/zgc 19

Input: 100000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 49ms 0.9ms 8.9MB 37ms 0ms go 1.19.5
java 1-m.java 408ms 21ms 162.0MB 643ms 57ms graal/jvm 17.0.6
java 1-m.java 455ms 22ms 115.7MB 710ms 67ms openjdk 20
java 1-m.java 465ms 10ms 117.2MB 757ms 47ms openjdk 19
java 1-m.java 572ms 10.0ms 208.7MB 770ms 187ms openjdk/zgc 19

fannkuch-redux

Input: 11

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 1212ms 0.4ms 5.0MB 2333ms 7ms go 1.19.5
java 1-m.java 1518ms 8.7ms 40.6MB 2877ms 20ms openjdk 20
java 1-m.java 1550ms 114ms 93.8MB 2910ms 37ms graal/jvm 17.0.6
java 1-m.java 1568ms 35ms 42.2MB 2860ms 77ms openjdk/zgc 19
java 1-m.java 1610ms 36ms 41.9MB 3050ms 13ms openjdk 19
go 3.go 2703ms 0.7ms 50.0MB 2677ms 7ms tinygo 0.25.0

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 129ms 1.8ms 5.0MB 187ms 3ms go 1.19.5
java 1-m.java 256ms 4.9ms 40.6MB 410ms 3ms openjdk 20
java 1-m.java 266ms 5.7ms 41.8MB 410ms 17ms openjdk 19
java 1-m.java 285ms 24ms 90.2MB 443ms 30ms graal/jvm 17.0.6
go 3.go 299ms 0.2ms 48.6MB 273ms 10ms tinygo 0.25.0
java 1.java 324ms 9.0ms 42.0MB 420ms 63ms openjdk/zgc 19

fasta

Input: 2500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3-m.go 209ms 0.6ms 2.9MB 373ms 0ms go 1.19.5
java 4.java 472ms 15ms 40.5MB 540ms 20ms openjdk 20
java 4.java 477ms 7.5ms 43.4MB 550ms 10ms openjdk 19
java 4.java 536ms 5.5ms 41.8MB 547ms 73ms openjdk/zgc 19
java 4.java 555ms 7.5ms 97.9MB 757ms 33ms graal/jvm 17.0.6

Input: 250000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 29ms 1.6ms 2.9MB 33ms 0ms go 1.19.5
java 4.java 151ms 4.9ms 40.7MB 160ms 13ms openjdk 19
java 4.java 152ms 14ms 39.8MB 170ms 13ms openjdk 20
java 4.java 159ms 10ms 86.3MB 180ms 30ms graal/jvm 17.0.6
java 4.java 210ms 11ms 41.2MB 170ms 70ms openjdk/zgc 19

helloworld

Input: QwQ

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 2.2ms 0.5ms 2.0MB 0ms 0ms tinygo 0.25.0
go 1.go 2.6ms 0.2ms 3.3MB 0ms 0ms go 1.19.5
java 1.java 80ms 2.1ms 48.1MB 72ms 14ms graal/jvm 17.0.6
java 1.java 87ms 9.2ms 39.3MB 78ms 16ms openjdk 20
java 1.java 93ms 4.7ms 42.4MB 76ms 24ms openjdk 19
java 1.java 150ms 9.1ms 41.0MB 86ms 64ms openjdk/zgc 19

http-server

Input: 3000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-http2.go 193ms 7.2ms 54.4MB 277ms 60ms go 1.19.5
go 2-m.go 688ms 22ms 170.2MB 600ms 493ms go 1.19.5
go 1-m.go 710ms 40ms 175.9MB 710ms 427ms go 1.19.5

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1-http2.go 48ms 3.3ms 24.8MB 50ms 10ms go 1.19.5
go 2.go 141ms 9.7ms 39.4MB 103ms 73ms go 1.19.5
go 1.go 149ms 17ms 38.9MB 103ms 70ms go 1.19.5

json-serde

Input: sample 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 2-ffi.go 80ms 2.9ms 41.7MB 57ms 17ms go 1.19.5
go 1.go 182ms 1.9ms 18.6MB 167ms 7ms go 1.19.5

Input: canada 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 2-ffi.go 407ms 13ms 164.0MB 380ms 97ms go 1.19.5
go 1.go 1073ms 7.2ms 103.6MB 1047ms 60ms go 1.19.5

knucleotide

Input: 2500000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 3-m.java 1420ms 16ms 113.4MB 2567ms 40ms openjdk 20
go 7-m.go 1422ms 15ms 41.6MB 2607ms 33ms go 1.19.5
java 3-m.java 1510ms 5.7ms 115.0MB 2733ms 40ms openjdk 19
java 3-m.java 1680ms 28ms 165.9MB 3040ms 73ms graal/jvm 17.0.6
java 3-m.java 2020ms 14ms 173.9MB 3490ms 163ms openjdk/zgc 19

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 7-m.go 241ms 4.9ms 23.9MB 353ms 23ms go 1.19.5
java 3-m.java 427ms 3.1ms 88.2MB 693ms 47ms openjdk 20
java 3-m.java 515ms 8.3ms 94.0MB 723ms 117ms openjdk/zgc 19
java 3-m.java 517ms 69ms 94.1MB 863ms 37ms openjdk 19
java 3-m.java 534ms 30ms 136.2MB 877ms 63ms graal/jvm 17.0.6

lru

Input: 1000 1000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 161ms 1.4ms 0.3MB 150ms 0ms tinygo 0.25.0
go 3.go 168ms 1.8ms 2.9MB 160ms 0ms go 1.19.5

Input: 1000 3000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 475ms 1.0ms 0.3MB 463ms 0ms tinygo 0.25.0
go 3.go 495ms 1.0ms 4.8MB 480ms 0ms go 1.19.5

Input: 100 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 3.go 83ms 0.5ms 2.0MB 70ms 0ms tinygo 0.25.0
go 3.go 92ms 1.8ms 4.1MB 80ms 0ms go 1.19.5

mandelbrot

Input: 5000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1b.java 1513ms 7.1ms 50.0MB 1583ms 17ms openjdk 19
java 1b.java 1520ms 20ms 47.0MB 1607ms 17ms openjdk 20
java 1b.java 1598ms 29ms 47.7MB 1643ms 73ms openjdk/zgc 19
java 1b.java 1602ms 55ms 104.0MB 1763ms 53ms graal/jvm 17.0.6
java 1a.java 1817ms 5.1ms 47.7MB 1897ms 10ms openjdk 20
java 1a.java 1820ms 9.5ms 48.4MB 1893ms 20ms openjdk 19
java 1a.java 1877ms 9.5ms 99.4MB 1970ms 43ms graal/jvm 17.0.6
java 1a.java 1883ms 4.3ms 47.6MB 1887ms 67ms openjdk/zgc 19
java 1.java 2052ms 28ms 129.3MB 2147ms 43ms graal/jvm 17.0.6
java 1.java 2104ms 131ms 195.1MB 2133ms 60ms openjdk 19
java 1.java 2160ms 16ms 203.4MB 2190ms 70ms openjdk 20
java 1.java 2595ms 8.5ms 562.4MB 2273ms 440ms openjdk/zgc 19
go 1.go 3957ms 3.0ms 6.8MB 3943ms 3ms go 1.19.5
go 1.go timeout 0.0ms 5.6MB 4983ms 0ms tinygo 0.25.0
java 2.java timeout 0.0ms 546.9MB 5143ms 160ms openjdk 19
java 2.java timeout 0.0ms 590.5MB 5113ms 180ms openjdk 20
java 2.java timeout 0.0ms 1764.1MB 4527ms 920ms openjdk/zgc 19

Input: 1000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 169ms 0.6ms 2.8MB 157ms 0ms go 1.19.5
java 1b.java 222ms 7.8ms 47.8MB 287ms 23ms openjdk 19
java 1a.java 240ms 7.6ms 45.1MB 307ms 23ms openjdk 20
java 1b.java 241ms 16ms 43.1MB 307ms 20ms openjdk 20
java 1a.java 245ms 10ms 46.8MB 290ms 27ms openjdk 19
java 1.java 248ms 5.0ms 97.4MB 290ms 30ms openjdk 19
java 1.java 256ms 6.0ms 96.8MB 297ms 33ms openjdk 20
java 1a.java 263ms 5.3ms 95.6MB 340ms 27ms graal/jvm 17.0.6
java 1.java 267ms 1.7ms 102.6MB 333ms 43ms graal/jvm 17.0.6
java 1a.java 289ms 11ms 44.7MB 280ms 80ms openjdk/zgc 19
java 1b.java 294ms 17ms 46.3MB 297ms 80ms openjdk/zgc 19
java 1b-m.java 316ms 23ms 101.9MB 467ms 37ms graal/jvm 17.0.6
go 1.go 328ms 0.3ms 0.0MB 320ms 0ms tinygo 0.25.0
java 1.java 329ms 7.3ms 112.4MB 297ms 93ms openjdk/zgc 19
java 2.java 830ms 68ms 584.2MB 953ms 180ms openjdk 20
java 2.java 850ms 53ms 592.4MB 997ms 177ms openjdk 19
java 2.java 1545ms 61ms 1103.2MB 1083ms 747ms openjdk/zgc 19

merkletrees

Input: 17

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 578ms 25ms 374.6MB 570ms 107ms openjdk 20
java 1.java 599ms 5.4ms 373.3MB 597ms 100ms openjdk 19
java 1.java 607ms 1.8ms 351.7MB 767ms 110ms graal/jvm 17.0.6
java 1.java 1062ms 7.0ms 737.3MB 673ms 530ms openjdk/zgc 19
go 1.go 2223ms 27ms 40.1MB 3083ms 63ms go 1.19.5
go 2.go 2469ms 6.5ms 41.8MB 3500ms 63ms go 1.19.5
go 1.go 4230ms 3.2ms 212.7MB 4150ms 60ms tinygo 0.25.0
go 2.go timeout 0.0ms 68.9MB 4973ms 7ms tinygo 0.25.0

Input: 15

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 1.java 259ms 11ms 174.3MB 250ms 63ms openjdk 19
java 1.java 264ms 11ms 222.1MB 263ms 60ms openjdk 20
java 1-m.java 301ms 2.6ms 279.6MB 410ms 60ms graal/jvm 17.0.6
java 1.java 460ms 1.7ms 307.8MB 270ms 230ms openjdk/zgc 19
go 1.go 474ms 6.1ms 12.5MB 633ms 20ms go 1.19.5
go 2.go 528ms 6.9ms 13.6MB 730ms 13ms go 1.19.5
go 1.go 732ms 1.3ms 52.2MB 703ms 7ms tinygo 0.25.0
go 2.go 1428ms 1.8ms 38.9MB 1403ms 3ms tinygo 0.25.0

nbody

Input: 5000000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 514ms 14ms 4.9MB 500ms 0ms go 1.19.5
java 1.java 599ms 11ms 89.9MB 623ms 27ms graal/jvm 17.0.6
java 1.java 651ms 5.4ms 40.6MB 660ms 10ms openjdk 20
java 1.java 661ms 11ms 42.0MB 657ms 23ms openjdk 19
go 1.go 705ms 0.8ms 0.0MB 697ms 0ms tinygo 0.25.0
java 1.java 707ms 18ms 41.7MB 650ms 70ms openjdk/zgc 19
java 2.java 2110ms 21ms 516.4MB 2083ms 167ms openjdk 20
java 2.java 2163ms 14ms 550.9MB 2123ms 173ms openjdk 19
java 2.java 2913ms 129ms 1417.8MB 2140ms 963ms openjdk/zgc 19

Input: 500000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 59ms 3.3ms 2.9MB 47ms 0ms go 1.19.5
go 1.go 73ms 0.5ms 0.0MB 63ms 0ms tinygo 0.25.0
java 1.java 160ms 6.0ms 40.5MB 167ms 23ms openjdk 20
java 1.java 163ms 3.2ms 89.9MB 190ms 30ms graal/jvm 17.0.6
java 1.java 178ms 5.1ms 42.0MB 170ms 23ms openjdk 19
java 1.java 217ms 7.7ms 43.8MB 173ms 63ms openjdk/zgc 19
java 2.java 460ms 1.3ms 347.4MB 490ms 107ms openjdk 20
java 2.java 488ms 15ms 362.6MB 517ms 107ms openjdk 19
java 2.java 793ms 2.4ms 487.0MB 563ms 377ms openjdk/zgc 19

nsieve

Input: 12

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 2.go 699ms 4.4ms 17.4MB 687ms 0ms tinygo 0.25.0
go 2.go 960ms 7.8ms 20.0MB 937ms 13ms go 1.19.5
java 2.java 1038ms 8.7ms 51.3MB 1070ms 17ms openjdk 20
java 2.java 1088ms 7.3ms 52.3MB 1120ms 13ms openjdk 19
java 2.java 1148ms 3.8ms 50.8MB 1113ms 70ms openjdk/zgc 19
go 1.go 1168ms 97ms 43.1MB 1153ms 3ms tinygo 0.25.0
java 1.java 1206ms 75ms 84.4MB 1220ms 27ms openjdk 20
go 1.go 1383ms 3.9ms 73.9MB 1350ms 20ms go 1.19.5
java 1.java 1465ms 36ms 112.2MB 1410ms 100ms openjdk/zgc 19
java 1.java 1523ms 26ms 85.7MB 1543ms 37ms openjdk 19
java 1.java 1999ms 39ms 241.2MB 2777ms 97ms graal/jvm 17.0.6
java 2-m.java 2014ms 153ms 290.9MB 3543ms 103ms graal/jvm 17.0.6

Input: 10

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 1.go 146ms 0.6ms 13.1MB 137ms 0ms tinygo 0.25.0
go 1.go 148ms 4.3ms 23.5MB 130ms 7ms go 1.19.5
go 2.go 160ms 0.5ms 5.4MB 150ms 0ms tinygo 0.25.0
go 2.go 216ms 1.8ms 7.6MB 203ms 3ms go 1.19.5
java 1.java 252ms 6.8ms 58.4MB 257ms 27ms openjdk 20
java 1.java 278ms 6.4ms 62.3MB 297ms 20ms openjdk 19
java 1.java 317ms 7.7ms 59.1MB 280ms 77ms openjdk/zgc 19
java 2.java 327ms 6.3ms 45.0MB 343ms 27ms openjdk 20
java 2.java 352ms 5.7ms 48.4MB 370ms 27ms openjdk 19
java 1.java 378ms 15ms 153.4MB 497ms 57ms graal/jvm 17.0.6
java 2.java 397ms 1.2ms 44.5MB 360ms 70ms openjdk/zgc 19
java 2-m.java 686ms 8.1ms 156.4MB 1170ms 77ms graal/jvm 17.0.6

pidigits

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 1421ms 7.6ms 8.5MB 1393ms 7ms go 1.19.5
java 1.java timeout 0.0ms 331.1MB 5447ms 97ms graal/jvm 17.0.6
java 1.java timeout 0.0ms 284.6MB 5387ms 110ms openjdk 19
java 1.java timeout 0.0ms 270.7MB 5410ms 100ms openjdk 20
java 1.java timeout 0.0ms 1375.1MB 4547ms 903ms openjdk/zgc 19

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 8.go 348ms 4.5ms 8.5MB 327ms 3ms go 1.19.5
java 1.java 1451ms 18ms 261.6MB 1790ms 90ms openjdk 19
java 1.java 1458ms 14ms 295.9MB 1767ms 100ms openjdk 20
java 1.java 1543ms 16ms 342.7MB 1893ms 113ms graal/jvm 17.0.6
java 1.java 2059ms 27ms 987.0MB 1660ms 750ms openjdk/zgc 19

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 111.3MB 4967ms 110ms go 1.19.5
go 3.go timeout 0.0ms 120.7MB 4940ms 40ms tinygo 0.25.0
java 3.java timeout 0.0ms 251.3MB 5357ms 113ms graal/jvm 17.0.6
java 3.java timeout 0.0ms 206.2MB 5233ms 87ms openjdk 19
java 3.java timeout 0.0ms 204.3MB 5237ms 77ms openjdk 20
java 3.java timeout 0.0ms 339.7MB 4920ms 277ms openjdk/zgc 19

Input: 250000_in

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
java 3-m.java 1022ms 5.4ms 166.2MB 1477ms 57ms graal/jvm 17.0.6
java 3.java 1024ms 24ms 111.9MB 1353ms 50ms openjdk 20
java 3.java 1028ms 9.0ms 109.8MB 1363ms 37ms openjdk 19
java 3.java 1174ms 17ms 157.9MB 1323ms 147ms openjdk/zgc 19
go 3.go 2426ms 7.5ms 20.9MB 2413ms 30ms go 1.19.5
go 3.go timeout 0.0ms 30.0MB 4980ms 3ms tinygo 0.25.0

secp256k1

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 151ms 1.1ms 9.2MB 137ms 3ms go 1.19.5

Input: 500

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 0-ffi.go 51ms 1.8ms 9.7MB 37ms 0ms go 1.19.5

spectral-norm

Input: 8000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 2235ms 18ms 5.4MB 4320ms 3ms go 1.19.5
java 2-m.java 4353ms 35ms 91.0MB 8370ms 40ms graal/jvm 17.0.6
go 1.go 4404ms 4.0ms 5.5MB 4393ms 3ms go 1.19.5
go 1.go timeout 0.0ms 0.4MB 4987ms 0ms tinygo 0.25.0
java 2.java timeout 0.0ms 44.0MB 9700ms 27ms openjdk 19
java 2.java timeout 0.0ms 40.6MB 9707ms 23ms openjdk 20
java 2.java timeout 0.0ms 43.9MB 9613ms 57ms openjdk/zgc 19

Input: 4000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 577ms 7.0ms 2.9MB 1083ms 0ms go 1.19.5
go 1.go 1114ms 1.2ms 2.9MB 1103ms 0ms go 1.19.5
java 2-m.java 1256ms 17ms 93.9MB 2293ms 27ms graal/jvm 17.0.6
java 2-m.java 1690ms 21ms 44.1MB 3167ms 20ms openjdk 19
java 2-m.java 1719ms 55ms 42.2MB 3123ms 70ms openjdk/zgc 19
java 2-m.java 1964ms 48ms 40.9MB 3727ms 17ms openjdk 20
go 1.go timeout 0.0ms 0.0MB 4983ms 0ms tinygo 0.25.0

Input: 2000

lang code time stddev peak-mem mem time(user) time(sys) compiler compiler/runtime
go 4-m.go 152ms 2.2ms 2.9MB 270ms 0ms go 1.19.5
go 1.go 284ms 2.4ms 2.9MB 270ms 0ms go 1.19.5
java 2-m.java 443ms 28ms 90.8MB 740ms 30ms graal/jvm 17.0.6
java 2-m.java 583ms 44ms 42.6MB 1013ms 17ms openjdk 19
java 2-m.java 603ms 35ms 40.7MB 1057ms 17ms openjdk 20
java 2-m.java 636ms 27ms 42.1MB 1000ms 70ms openjdk/zgc 19
go 1.go 1642ms 4.7ms 0.0MB 1630ms 0ms tinygo 0.25.0