Skip to content

Instantly share code, notes, and snippets.

@Whiteknight
Created February 4, 2012 21:07
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 Whiteknight/1740148 to your computer and use it in GitHub Desktop.
Save Whiteknight/1740148 to your computer and use it in GitHub Desktop.
<parrot git:master> ./parrot test.pir
test_call_sig: 3.87282800674438s
test_get_context: 3.55188488960266s
<parrot git:master> ./parrot test.pir
test_call_sig: 4.13274502754211s
test_get_context: 3.56804704666138s
<parrot git:master> ./parrot test.pir
test_call_sig: 3.73126316070557s
test_get_context: 3.40411400794983s
.sub test_call_sig
.param pmc sig :call_sig
$P0 = sig
.end
.sub test_get_context
$P0 = get_context
.end
.sub main :main
$N0 = time
$I0 = 0
first_loop_top:
'test_call_sig'(1, 2, 3, 4)
$I0 = $I0 + 1
if $I0 >= 1000000 goto first_loop_bottom
goto first_loop_top
first_loop_bottom:
$N1 = time
print "test_call_sig: "
$N2 = $N1 - $N0
print $N2
say "s"
$N0 = time
$I0 = 0
second_loop_top:
'test_get_context'(1, 2, 3, 4)
$I0 = $I0 + 1
if $I0 >= 1000000 goto second_loop_bottom
goto second_loop_top
second_loop_bottom:
$N1 = time
print "test_get_context: "
$N2 = $N1 - $N0
print $N2
say "s"
.end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment