Initial check-in of perl compiler.
[p5sagit/p5-mst-13.2.git] / ramblings / foo2.bench
1 # The following doesn't work: if $foo_ir and $bar_ir aren't initialised
2 # then when we hit the $bar += $foo_ir in the middle of the loop for the
3 # first time, we trigger a load_int for $bar_ir from its backing SV.
4 use integer;
5 my $foo_ir;
6 my $bar_ir;
7
8 for ($foo_ir = 0; $foo_ir < 3000000; $foo_ir += 2) {
9     $bar_ir += $foo_ir;
10 }
11 print "\$foo_ir = $foo_ir, \$bar_ir = $bar_ir\n";