Skip to content

Instantly share code, notes, and snippets.

@sharkdp
Created December 12, 2020 09:38
Show Gist options
  • Save sharkdp/927e3b05f78e2bf2a3d696e3b3856ce6 to your computer and use it in GitHub Desktop.
Save sharkdp/927e3b05f78e2bf2a3d696e3b3856ce6 to your computer and use it in GitHub Desktop.
just-exit benchmark
echo "int main() {}" > just-exit.c
gcc -O just-exit.c -o just-exit-c
echo "" > just-exit.py
echo "fn main() {}" > just-exit.rs
rustc -O just-exit.rs -o just-exit-rs
echo "" > just-exit.rb
echo "" > just-exit.sh
hyperfine \
--warmup 50 \
"./just-exit-c" -n "C/just-exit" \
"./just-exit-rs" -n "Rust/just-exit" \
"bash just-exit.sh" -n "Bash/just-exit" \
"python just-exit.py" -n "Python/just-exit" \
"ruby just-exit.rb" -n "Ruby/just-exit"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment