A few days ago I noticed that the vpm benchmark was failing. Then today, I saw that the majority of the OO benchmarks were failing. I'd like to propose including testbench under fulltest so that the benchmarks can be more readily tested. Maybe that will help keep the benchmarks from getting broken so easily.
I've included a patch that fixes the vpm bench. Seems the recent changes to split broke it. I didn't work out the OO bench fixes yet. Anyone else wanna take a stab at it? Its most likely ridiculously simple. Actually, I have a related question. Since the current object isn't in P2 anymore and "self" in PIR replaces it, what is the equivalent in pasm? That looks like what's breaking the OO benches right now. Thanks, Justin DeVuyst
--- parrot/examples/benchmarks/vpm.imc 2004-12-13 03:00:24.000000000 -0500 +++ parrot_new/examples/benchmarks/vpm.imc 2004-12-12 20:42:42.000000000 -0500 @@ -1,52 +1,33 @@ -# beginn -#use strict; -# -#use warnings; - .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