[svn:parrot] r41158 - trunk/examples/benchmarks
chromatic at svn.parrot.org
chromatic at svn.parrot.org
Tue Sep 8 18:05:20 UTC 2009
Author: chromatic
Date: Tue Sep 8 18:03:48 2009
New Revision: 41158
URL: https://trac.parrot.org/parrot/changeset/41158
Log:
[examples] Sped up oofib PIR benchmark by 17.81% by reducing unnecessary PMCs
created in the PIR code; no changes to Parrot itself.
Modified:
trunk/examples/benchmarks/oofib.pir
Modified: trunk/examples/benchmarks/oofib.pir
==============================================================================
--- trunk/examples/benchmarks/oofib.pir Tue Sep 8 16:23:31 2009 (r41157)
+++ trunk/examples/benchmarks/oofib.pir Tue Sep 8 18:03:48 2009 (r41158)
@@ -6,12 +6,14 @@
.local int argc
argc = argv
.local pmc N
- N = new 'Integer'
- N = 24
if argc <= 1 goto noarg
$S0 = argv[1]
N = $S0
noarg:
+ N = new 'Integer'
+ N = 24
+ goto begin
+begin:
.local num start
time start
@@ -51,13 +53,10 @@
.local pmc n2
.local pmc r1
.local pmc r2
- n1 = new 'Integer'
- n2 = new 'Integer'
n1 = n - 1
n2 = n - 2
r1 = self."fibA"(n1)
r2 = self."fibB"(n2)
- n = new 'Integer'
n = r1 + r2
.return (n)
.end
@@ -71,13 +70,10 @@
.local pmc n2
.local pmc r1
.local pmc r2
- n1 = new 'Integer'
- n2 = new 'Integer'
n1 = n - 1
n2 = n - 2
r1 = self."fib"(n1)
r2 = self."fibB"(n2)
- n = new 'Integer'
n = r1 + r2
.return (n)
.end
@@ -93,13 +89,10 @@
.local pmc n2
.local pmc r1
.local pmc r2
- n1 = new 'Integer'
- n2 = new 'Integer'
n1 = n - 1
n2 = n - 2
r1 = self."fib"(n1)
r2 = self."fibA"(n2)
- n = new 'Integer'
n = r1 + r2
.return (n)
.end
More information about the parrot-commits
mailing list