cvsuser 04/12/13 01:52:07
Modified: examples/benchmarks oo1.pasm oo2.pasm oo3.pasm oo4.pasm
vpm.imc
Removed: examples/benchmarks oo1-prop.pasm oo2-prop.pasm
hash-utf8.pasm b60.imc b60.py b61.imc b61.py
b62.imc b62.py b63.imc b63.py b64.imc b64.py
b65.imc b65.py b6t.imc b6t.py
Log:
benchmark fixes
* removed broken (transcode) or python benchmarks
* vpm fix
Courtesy of Justin DeVuyst <[EMAIL PROTECTED]>
Revision Changes Path
1.9 +2 -0 parrot/examples/benchmarks/oo1.pasm
Index: oo1.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/oo1.pasm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- oo1.pasm 26 Nov 2004 17:34:48 -0000 1.8
+++ oo1.pasm 13 Dec 2004 09:52:07 -0000 1.9
@@ -57,6 +57,8 @@
end
.pcc_sub init:
+.include "interpinfo.pasm"
+ interpinfo P2, .INTERPINFO_CURRENT_OBJECT
classoffset I0, P2, "Foo"
new P10, .PerlInt
set P10, 10
1.5 +2 -0 parrot/examples/benchmarks/oo2.pasm
Index: oo2.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/oo2.pasm,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- oo2.pasm 26 Nov 2004 17:34:48 -0000 1.4
+++ oo2.pasm 13 Dec 2004 09:52:07 -0000 1.5
@@ -44,6 +44,8 @@
end
.pcc_sub init:
+.include "interpinfo.pasm"
+ interpinfo P2, .INTERPINFO_CURRENT_OBJECT
classoffset I0, P2, "Foo"
new P10, .PerlInt
set P10, 10
1.4 +2 -0 parrot/examples/benchmarks/oo3.pasm
Index: oo3.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/oo3.pasm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- oo3.pasm 26 Nov 2004 17:34:48 -0000 1.3
+++ oo3.pasm 13 Dec 2004 09:52:07 -0000 1.4
@@ -28,6 +28,8 @@
end
.pcc_sub init:
+.include "interpinfo.pasm"
+ interpinfo P2, .INTERPINFO_CURRENT_OBJECT
classoffset I0, P2, "Foo"
new P10, .PerlInt
set P10, 10
1.4 +2 -0 parrot/examples/benchmarks/oo4.pasm
Index: oo4.pasm
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/oo4.pasm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- oo4.pasm 26 Nov 2004 17:34:48 -0000 1.3
+++ oo4.pasm 13 Dec 2004 09:52:07 -0000 1.4
@@ -28,6 +28,8 @@
end
.pcc_sub init:
+.include "interpinfo.pasm"
+ interpinfo P2, .INTERPINFO_CURRENT_OBJECT
classoffset I0, P2, "Foo"
new P10, .PerlInt
set P10, 10
1.4 +29 -43 parrot/examples/benchmarks/vpm.imc
Index: vpm.imc
===================================================================
RCS file: /cvs/public/parrot/examples/benchmarks/vpm.imc,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- vpm.imc 17 Mar 2004 16:03:05 -0000 1.3
+++ vpm.imc 13 Dec 2004 09:52:07 -0000 1.4
@@ -3,50 +3,36 @@
#
#use warnings;
-.sub _main
+.sub main
-# my $big;
- .sym pmc big
- big = new PerlUndef
-# my $string="just another perl hacker";
- .sym pmc String
- String = new PerlUndef
- String = "just another perl hacker"
-
-# for (0 .. 99999) {
- $P0 = new PerlUndef
- $P0 = 0
-loop:
-# $big++;
- inc big
-# my @str=split(//,$string);
- .sym pmc str
- $S0 = String
- split str, "", $S0
-# my $f=shift(@str);
- .sym pmc f
- f = new PerlUndef
- shift $P2, str
- assign f, $P2
-# push(@str,$f);
- push str, f
-# $string=join('',@str);
- join $S2, "", str
- String = $S2
-#}
- inc $P0
- if $P0 <= 99999 goto loop
-
-#print "$big;
- print big
- print "\n"
-#$string
-#";
- print String
- print "\n"
- end
-# ende
-.end
+$S0 = "just another perl hacker"
+
+$I0 = 0
+loop0:
+
+ .sym pmc str
+ split str, "", $S0
+
+ $I1 = 0
+ $S1 = str[$I1]
+ loop1:
+ $I2 = $I1 + 1
+ $S2 = str[$I2]
+ str[$I1] = $S2
+ inc $I1
+ if $I1 < 23 goto loop1
+ str[$I1] = $S1
+ join $S0, "", str
+ inc $I0
+if $I0 <= 99999 goto loop0
+print $I0
+print "\n"
+
+print $S0
+print "\n"
+
+end
+.end