Skip to content

Instantly share code, notes, and snippets.

@jyotty
Created May 26, 2012 19:07
Show Gist options
  • Select an option

  • Save jyotty/2794985 to your computer and use it in GitHub Desktop.

Select an option

Save jyotty/2794985 to your computer and use it in GitHub Desktop.
perl6: not quite ready
$ time perl -MList::Util=reduce -le 'print reduce { $a + $b } (1..1000000)'
500000500000
perl -MList::Util=reduce -le 'print reduce { $a + $b } (1..1000000)' 0.22s user 0.05s system 98% cpu 0.275 total
$ time ruby -e 'puts (1..1000000).inject(0) {|x,i| x+i}'
500000500000
ruby -e 'puts (1..1000000).inject(0) {|x,i| x+i}' 0.14s user 0.04s system 98% cpu 0.187 total
$ time perl6 -e 'print [+] 1..1000000' # rakudo star 201201
500000500000perl6 -e 'print [+] 1..1000000' 478.78s user 5.98s system 99% cpu 8:08.09 total
$ time perl6 -e 'print [+] 1..1000000' # rakudo star 201205
500000500000perl6 -e 'print [+] 1..1000000' 25.94s user 0.67s system 99% cpu 26.626 total
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment