Created
July 26, 2011 14:51
-
-
Save anonymous/1106928 to your computer and use it in GitHub Desktop.
Trying to come to terms with some benchmarks (before and after --optimize)
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
# I'm trying to get a handle on benchmarks... NQR is getting killed by R. | |
# And though I can "compile" my NQR scripts, the benchmark results aren't | |
# changing. So I tried the following in pure PIR, where the speed is | |
# comparable to R (though the PIR doesn't have anywhere near the overhead | |
# of a full interpreted language). | |
# 1 0.017 # First examples, just | |
# 10000 0.018 # time parrot test.pir (done many times, averaging) | |
# 1000000 0.120 | |
# 10000000 0.986 | |
# 10000000* 0.987 # No difference after compilation. From: | |
# parrot -o test.pbc test.pir | |
# time parrot test.pbc (done many times, averaging) | |
######################################################################### | |
######## Following whiteknight++'s recommendation, I rebuilt Parrot with: | |
# perl Configure.pl --optimize | |
# | |
# and then repeated the experiment, above. RESULT: bug improvement (say 5x speedup), | |
# though compiling to bytecode still does nothing for me. | |
# RESULTS after rebuilding parrot with --optimize | |
# 1 0.014 | |
# 10000 0.015 | |
# 1000000 0.036 | |
# 10000000 0.190 | |
# 10000000* 0.191 # No speedup again of compiling | |
# Adding the --debugging=0 option didn't make a difference in this simple example. | |
################################## | |
# test.pir, below | |
.sub main | |
$I0 = 10000000 | |
loop_top: | |
if $I0 < 0 goto loop_end | |
$I0 = $I0 - 1 | |
goto loop_top | |
loop_end: | |
.end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment