Skip to content

Instantly share code, notes, and snippets.

@pmichaud
Created June 18, 2012 16:27
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/2949241 to your computer and use it in GitHub Desktop.
Save pmichaud/2949241 to your computer and use it in GitHub Desktop.
pmichaud@kiwi:/zip/perl/rakudo-2012.05$ cat z
#!/bin/bash
for size in 1 10 100 130 135 137 138 139 140 1000 10000;
do
code=$(./perl6 -e "say (1..$size).join('+')")
echo -n "Expressions in input: $size: " ;
time --format=%e -- ./perl6 -e "my \$x = $code;" || break;
done
pmichaud@kiwi:/zip/perl/rakudo-2012.05$ sh z
Expressions in input: 1: 0.27
Expressions in input: 10: 0.31
Expressions in input: 100: 0.67
Expressions in input: 130: 0.88
Expressions in input: 135: 0.86
Expressions in input: 137: 0.89
Expressions in input: 138: 0.89
Expressions in input: 139:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment