Skip to content

Instantly share code, notes, and snippets.

@shinh
Created November 20, 2015 00:23
Show Gist options
  • Save shinh/5201504bb67a430f1fbc to your computer and use it in GitHub Desktop.
Save shinh/5201504bb67a430f1fbc to your computer and use it in GitHub Desktop.
( '-') time ./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end'
ruby 2.3.0dev (2015-10-26 trunk 52284) [x86_64-linux]
./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end' 0.93s user 0.00s system 99% cpu 0.940 total
( '-') time ./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end'
ruby 2.3.0dev (2015-10-26 trunk 52284) [x86_64-linux]
./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end' 0.83s user 0.00s system 99% cpu 0.834 total
( '-') time ./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end' 2> /dev/null
ruby 2.3.0dev (2015-03-05 rujit 49845) [x86_64-linux]
last_commit=Merge pull request #3 from jserv/rujit
./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end' 2> 0.38s user 0.02s system 97% cpu 0.403 total
( '-') time ./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end' 2> /dev/null
ruby 2.3.0dev (2015-03-05 rujit 49845) [x86_64-linux]
last_commit=Merge pull request #3 from jserv/rujit
./miniruby -ve'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end' 2> 0.38s user 0.01s system 97% cpu 0.402 total
( '-') crystal -v
Crystal 0.9.1 [b3b1223] (Fri Oct 30 03:48:35 UTC 2015)
( '-') time crystal eval 'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end'
crystal eval 'a=100;i=0;while i<0xffffff;i+=1;a*=557;a+=2;a%=100000;end' 0.41s user 0.08s system 105% cpu 0.467 total
( '-') time crystal eval 'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end'
crystal eval 'a=100;i=0;while i<0xffffff;i+=1;a=(a*557+2)%100000;end' 0.38s user 0.06s system 104% cpu 0.424 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment