Skip to content

Instantly share code, notes, and snippets.

@shawwn
Created September 8, 2018 23:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shawwn/544b643bba018fb6bd302a5c46222ca6 to your computer and use it in GitHub Desktop.
Save shawwn/544b643bba018fb6bd302a5c46222ca6 to your computer and use it in GitHub Desktop.
Dispelling myths on HN
~$ time luajit -e 'print(1)'
1
real 0m0.090s
user 0m0.031s
sys 0m0.053s
~$ time luajit -e 'print(1)'
1
real 0m0.082s
user 0m0.032s
sys 0m0.048s
~$ time luajit -e 'print(1)'
1
real 0m0.077s
user 0m0.032s
sys 0m0.044s
~$ time luajit -e 'print(1)'
1
real 0m0.076s
user 0m0.031s
sys 0m0.042s
~$ time luajit -e 'print(1)'
1
real 0m0.077s
user 0m0.031s
sys 0m0.045s
~$ time python -c 'print(1)'
1
real 0m0.111s
user 0m0.023s
sys 0m0.041s
~$ time python -c 'print(1)'
1
real 0m0.046s
user 0m0.020s
sys 0m0.022s
~$ time python -c 'print(1)'
1
real 0m0.047s
user 0m0.020s
sys 0m0.021s
~$
~$ time python -c 'print(1)'
1
real 0m0.051s
user 0m0.020s
sys 0m0.023s
~$ time python -c 'print(1)'
1
real 0m0.046s
user 0m0.020s
sys 0m0.021s
~$ time python -c 'print(1)'
1
real 0m0.049s
user 0m0.021s
sys 0m0.023s
~$ time node -e 'console.log(1)'
1
real 0m0.121s
user 0m0.060s
sys 0m0.029s
~$ time node -e 'console.log(1)'
1
real 0m0.079s
user 0m0.059s
sys 0m0.017s
~$ time node -e 'console.log(1)'
1
real 0m0.083s
user 0m0.059s
sys 0m0.016s
~$ time node -e 'console.log(1)'
1
real 0m0.079s
user 0m0.059s
sys 0m0.017s
~$ time node -e 'console.log(1)'
1
real 0m0.080s
user 0m0.061s
sys 0m0.016s
~$ time node -e 'console.log(1)'
1
real 0m0.079s
user 0m0.060s
sys 0m0.016s
~$ time node -e 'console.log(1)'
1
real 0m0.079s
user 0m0.060s
sys 0m0.017s
~$ time node -e 'console.log(1)'
1
real 0m0.076s
user 0m0.057s
sys 0m0.016s
@martinmroz
Copy link

cat "fn main() { println!("1"); }" > main.rs
cargo build --release
time ./hello
1

real 0m0.007s
user 0m0.003s
sys 0m0.003s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment