Skip to content

Instantly share code, notes, and snippets.

@perl6
Created June 1, 2009 12:04
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 perl6/121366 to your computer and use it in GitHub Desktop.
Save perl6/121366 to your computer and use it in GitHub Desktop.
$ 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