Created
June 1, 2012 20:25
-
-
Save anonymous/2854930 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@kiwi:~/p6/rakudo-qrpa$ cat z.pir | |
.loadlib 'perl6_group' | |
.sub 'main' :main | |
.local int N | |
.local num t0, t1 | |
.local pmc p, q | |
p = new "ResizablePMCArray" | |
q = new "QRPA" | |
$P0 = box 'abc' | |
$I0 = 0 | |
p[$I0] = $P0 | |
q[$I0] = $P0 | |
N = 10000000 | |
t0 = time | |
loop1: | |
unless N > 0 goto done1 | |
$P0 = q[$I0] | |
dec N | |
goto loop1 | |
done1: | |
t1 = time | |
$N0 = t1 - t0 | |
print "qrpa[$I0] = " | |
say $N0 | |
N = 10000000 | |
t0 = time | |
loop2: | |
unless N > 0 goto done2 | |
$P0 = p[$I0] | |
dec N | |
goto loop2 | |
done2: | |
t1 = time | |
$N0 = t1 - t0 | |
print " rpa[$I0] = " | |
say $N0 | |
.end | |
pmichaud@kiwi:~/p6/rakudo-qrpa$ make dynext/perl6_group.so && install/bin/parrot z.pir | |
make: `dynext/perl6_group.so' is up to date. | |
qrpa[$I0] = 0.405800104141235 | |
rpa[$I0] = 0.320003986358643 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment