Skip to content

Instantly share code, notes, and snippets.

Created September 15, 2010 17:33
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 anonymous/581102 to your computer and use it in GitHub Desktop.
Save anonymous/581102 to your computer and use it in GitHub Desktop.
pmichaud@orange:~/rakudo$ cat y2.pir
.loadlib 'math_ops'
.sub 'main' :main
load_bytecode 'perl6.pbc'
.local string s
.local int n
$I0 = rand 10000
s = $I0
n = 1
loop:
unless n < 25000 goto done
$I0 = rand 10000
$S0 = $I0
$P0 = box 1
$P0 = box 1
# s = concat s, ', '
# s = concat s, $S0
inc n
goto loop
done:
$I0 = length s
say $I0
.end
pmichaud@orange:~/rakudo$ time parrot_install/bin/parrot y2.pir
4
real 0m0.722s
user 0m0.610s
sys 0m0.120s
pmichaud@orange:~/rakudo$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment