|
|
|
|
|
by weberc2
2618 days ago
|
|
I rewrote the Go benchmark to be a mechanical translation of C and it performs much better. C (gcc -O3): 23.8s
Julia (julia 1.1.0): 32.8s
Go (alt) (go 1.12): 39.3s
Java (java 1.8.0_60): 44.2s
Go (org) (go 1.12): 64.8s
OCaml (ocaml 4.07.1): 79.1s
JS (node 11.14.0): 137.0s
Pypy (pypy 6.0.0): 139.4s
C# (mono 4.2.1): 187.3s
Rust: DOES NOT COMPILE
So Go is only twice as slow as C, not thrice as slow. This puts it just ahead of Java and just behind Julia. |
|
I'm sure a "mechanical translation of [the] C" version would improve things for the Java ver as well. If we removed startup costs (the class file validation, etc) I'd expect it to be on par with C.