Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created June 18, 2012 16:07
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/2949136 to your computer and use it in GitHub Desktop.
Save pmichaud/2949136 to your computer and use it in GitHub Desktop.
pmichaud@kiwi:~/p6/rakudo$ 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 "$code" || break
done
pmichaud@kiwi:~/p6/rakudo$ sh z
Expressions in input: 1: 0.35
Expressions in input: 10: 0.33
Expressions in input: 100: 0.35
Expressions in input: 1000: 0.35
Expressions in input: 10000: 0.34
pmichaud@kiwi:~/p6/rakudo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment