Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

leo (5366)

  (email not shown publicly)

Journal of leo (5366)

Wednesday February 08, 2006
11:56 AM

Parrot -Ofun

[ #28623 ]

Heureka - from the -Ofun department

Or - running the ackermann function (and possibly other recursive functions) really fast.

$ time ./parrot -Oc -C ack.pir 11
Ack(3, 11) = 16381

real 0m0.567s
user 0m0.559s
sys 0m0.008s

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

real 0m0.980s
user 0m0.978s
sys 0m0.002s

The latter is optimized C code. Parrot is recompiling (or will do when that's finished) statically known and simple PIR code to native machine code via it's JIT system.

See also a recent post on perl6-internals.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • It's been a while since I've programmed in Assembly, and it's been an itch that I've wanted to scratch lately. That's really cool that the benchmarks turned around a result faster than optimized C. Good stuff!