Dan Sugalski <[EMAIL PROTECTED]> wrote: > On Wed, 8 Oct 2003, Leopold Toetsch wrote:
>> I don't have that here (Athlon). They are equally fast. PerlInts have >> some overhead due to possible type morphing, though. > Hrm. This system's showing the PerlInt at about 25% slower for a tight > division loop, though that's the most expensive case) Have it too now. It depends on the values. 10/2 (my original) is same speed, 10/3 gives your oberved 25%. Its due to morphing the result to an PerlNum. BTW: $ time perl -e'$a=10;$b=2; $i=5000000; $c=$a/$b for 0..$i' real 0m3.955s $ parrot -P mmd.imc # 10/3; unoptimized build, Athlon 800 1.507748 2.018662 $ parrot -j mmd.imc 1.319433 1.640584 > Prelim docs are in. Thanks. > Dan leo :r src/parrot-leo/mmd.imc .sub _main P0 = new Integer P1 = new Integer P2 = new Integer P1 = 10 P2 = 3 I0 = 5000000 time N0 l1: P0 = P1 / P2 dec I0 if I0 goto l1 time N1 sub N1, N0 print N1 print "\n" P0 = new PerlInt P1 = new PerlInt P2 = new PerlInt P1 = 10 P2 = 3 I0 = 5000000 time N0 l2: P0 = P1 / P2 dec I0 if I0 goto l2 time N1 sub N1, N0 print N1 print "\n" end .end