develooper Front page | perl.perl6.internals | Postings from February 2006

Re: Heureka - from the -Ofun department

Thread Previous | Thread Next
From:
Matt Diephouse
Date:
February 10, 2006 21:52
Subject:
Re: Heureka - from the -Ofun department
Message ID:
198c87380602102152w576a5384x274913a051c3a66b@mail.gmail.com
Andy Dougherty <doughera@lafayette.edu> 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

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About