Measure the startup overhead of different programming languages
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

++

iacore 7bb6ec38 c190350c

+34 -13
+4 -6
.gitignore
··· 1 - true-go 2 - true-hare 3 - true-s 4 - true-zig 5 - true-zig.o 6 - true-lean 1 + true-* 2 + *.o 3 + True.hi 4 + /true
+5
True.hs
··· 1 + import System.Exit 2 + 3 + main :: IO () 4 + main = exitSuccess 5 +
+5
readme.md
··· 2 2 3 3 See [timings](timings.md). 4 4 5 + ## Findings 6 + 7 + Rust depends on libc. 8 + 9 + Everything that depends on libc is slower than C.
+7 -1
run-all
··· 1 + #!/usr/bin/fish 2 + 1 3 nasm -f elf64 true.s 2 4 ld -o true-s true.o 3 5 ··· 10 12 lean -cTrue.c True.lean 11 13 leanc -O3 -o true-lean True.c 12 14 13 - hyperfine --export-markdown timings.md -N 'true' './true-s' './true-zig' './true-hare' './true-go' './true-lean' 15 + ghc True.hs -o true-haskell -O 16 + 17 + rustc -O -o true-rust true.rs 18 + 19 + hyperfine --export-markdown timings.md -N 'true' './true-s' './true-zig' './true-hare' './true-go' './true-lean' './true-haskell' './true-rust'
+8 -6
timings.md
··· 1 1 | Command | Mean [µs] | Min [µs] | Max [µs] | Relative | 2 2 |:---|---:|---:|---:|---:| 3 - | `true` | 272.9 ± 31.2 | 238.0 | 933.2 | 3.35 ± 1.43 | 4 - | `./true-s` | 81.5 ± 33.5 | 71.5 | 1460.9 | 1.00 | 5 - | `./true-zig` | 87.1 ± 43.1 | 76.7 | 1748.2 | 1.07 ± 0.69 | 6 - | `./true-hare` | 94.7 ± 48.2 | 84.1 | 1904.5 | 1.16 ± 0.76 | 7 - | `./true-go` | 579.1 ± 133.1 | 499.8 | 4066.2 | 7.11 ± 3.34 | 8 - | `./true-lean` | 1632.5 ± 75.0 | 1519.5 | 2243.9 | 20.04 ± 8.28 | 3 + | `true` | 272.9 ± 24.8 | 238.2 | 596.4 | 3.33 ± 0.76 | 4 + | `./true-s` | 81.9 ± 17.3 | 70.0 | 842.5 | 1.00 | 5 + | `./true-zig` | 87.9 ± 17.6 | 74.7 | 921.4 | 1.07 ± 0.31 | 6 + | `./true-hare` | 94.1 ± 16.3 | 81.8 | 688.2 | 1.15 ± 0.31 | 7 + | `./true-go` | 571.8 ± 34.0 | 485.5 | 944.4 | 6.98 ± 1.53 | 8 + | `./true-lean` | 1746.8 ± 1517.1 | 1534.0 | 20122.6 | 21.33 ± 19.07 | 9 + | `./true-haskell` | 675.2 ± 31.0 | 625.6 | 1206.2 | 8.25 ± 1.78 | 10 + | `./true-rust` | 390.8 ± 30.1 | 342.0 | 663.1 | 4.77 ± 1.07 |
+5
true.rs
··· 1 + use std::process::ExitCode; 2 + 3 + fn main() -> ExitCode { 4 + 0.into() 5 + }