Created
September 15, 2010 17:33
-
-
Save anonymous/581102 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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