Andy Dougherty <[EMAIL PROTECTED]> wrote:
> Thinking it might have something to do with the SPARC architecture,
> I tried it on x86, where Parrot took 80 times as long:
>
> C:  time ./ack 11
>     Ack(3,11): 16381
>
>     real    0m0.759s
>     user    0m0.758s
>     sys     0m0.002s
>
> Parrot:  time ./parrot -Oc -C ../tmp/ack.pir 11
>     Ack(3, 11) = 16381
>
>     real    1m1.211s
>     user    1m1.087s
>     sys     0m0.021s
>
> Something's obviously very goofy there, but I don't know what.

Leo forgot the -j flag, which enables JIT, in his post. It makes quite
a difference:

  Parrot w/o JIT: time ./parrot -C -Oc examples/shootout/ack.pir 11
  Ack(3, 11) = 16381

  real    7m11.365s
  user    7m11.066s
  sys     0m0.168s

  Parrot w/ JIT: time ./parrot -Cj -Oc examples/shootout/ack.pir 11
  Ack(3, 11) = 16381

  real    0m3.502s
  user    0m3.477s
  sys     0m0.021s

  GCC 4.0:  time ./ack 11
  Ack(3,11): 16381

  real    0m1.960s
  user    0m1.948s
  sys     0m0.003s

I didn't use the custom PIR he posted (which is faster), so Parrot
didn't beat the GCC code.

--
matt diephouse
http://matt.diephouse.com

Reply via email to