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

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.
  • I think it's important to note that the PIR example represents something of a lower bound for languages targeting Parrot.

    The PIR code is designed to be fast and is most likely simpler than the generated code will be from any HLL compiler (and it doesn't need to load any whole language runtimes). So while I hope that Perl-6-on-Parrot will generate such fast code, in all likelihood I think it'll be a fair bit slower than that.

    It's a good thing that the PIR is that fast, but I don't think it's much of a metric
    • That's a fair point, but it's also important to note that it's possible to write efficient and cross-platform PIR by hand to use from any HLL in case you need additional speed. Compare that to dropping down to C (and then trying to distribute that C across multiple platforms).

      Even if Perl 6 on Parrot is an order of magnitude slower than PIR on Parrot, it's still faster than Perl 5 on C.

  • Ok, I won't complain anymore ... but wait, what about der perl6 binary?
  • With ...

    $ time parrot -Cj -O3 examples/benchmarks/fib.pir
    fib(28) = 317811 0.007305s

    ... you are just measuring parrot startup time, which isn't optimized in any way.

    Please try something real ;-) like fib 38.

    $ time ./parrot -Cj -O3 examples/benchmarks/fib.pir 38
    fib(38) = 39088169 0.671501s

    (on my ancient 2GHz Athlon). Wirh perl 5.8.8 it's consuming some time:

    $ time perl examples/benchmarks/ 38
    fib(38) = 39088169

    real    2m3.206s

    which is exactly what I've always said: compiler t