Created
June 1, 2009 12:04
-
-
Save perl6/121366 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
$ cat x2.pir | |
.HLL 'foo' | |
.sub 'main' | |
.local pmc obj | |
$P0 = newclass 'P6object' | |
$P1 = subclass $P0, 'Object' | |
$P2 = subclass $P1, 'Any' | |
$P3 = subclass $P2, 'Range' | |
obj = new ['Range'] | |
$I0 = 0 | |
loop: | |
unless $I0 < 100000 goto done | |
$P0 = get_root_namespace ['parrot';'Float'] | |
$P0 = get_class $P0 | |
$I1 = isa obj, $P0 | |
inc $I0 | |
goto loop | |
done: | |
.end | |
$ time ./parrot x2.pir | |
real 0m0.515s | |
user 0m0.500s | |
sys 0m0.016s | |
$ | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment