Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created June 18, 2012 16:14
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 pmichaud/2949162 to your computer and use it in GitHub Desktop.
Save pmichaud/2949162 to your computer and use it in GitHub Desktop.
pmichaud@kiwi:/zip/perl/rakudo-2012.05$ cat z
for size in 1 10 100 1000 10000;
do
code=$(for n in $(eval "echo {1..$size}"); do echo -n "+1"; done);
echo -n "Expressions in input: $size: " ;
time --format=%e -- ./perl6 -e "my \$x = 1$code;" || break;
done
pmichaud@kiwi:/zip/perl/rakudo-2012.05$ sh z
Expressions in input: 1: 0.29
Expressions in input: 10: 0.28
Expressions in input: 100: 0.28
Expressions in input: 1000: 0.28
Expressions in input: 10000: 0.27
pmichaud@kiwi:/zip/perl/rakudo-2012.05$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment