in reply to Re: Why should I use perl 5.10?
in thread Why should I use perl 5.10?

Plus 5.10 is faster, smaller, and cooler. What more do you need? O yeah, how about switch/case statement and named captures in regexp as a couple of bonuses, among many others? Those are features many Perl programmers have been waiting for ages, and finally their wishes have been fulfilled.

All you need to do is upgrade your OS distribution or install a fresh box in a few months, and Perl 5.10 will most probably be there, ready for use.

You can just use 5.10 as if it were your old 5.8. Discover new cool features as you go, at your pace. Really, there's NO risk.

Replies are listed 'Best First'.
Re^3: Why should I use perl 5.10?
by Anonymous Monk on Dec 21, 2007 at 10:34 UTC
    Faster? Anyone got some numbers to prove this?
      Faster? Anyone got some numbers to prove this?
      use Benchmark; timethese(100000, { 'Test' => 'eval{die "x" x 100000 if $] < 5.01}', });
      Under perl 5.8:
      Benchmark: timing 100000 iterations of Test... Test: 15 wallclock secs (14.98 usr + 0.00 sys = 14.98 CPU) @ 66 +73.34/s (n=100000))
      Under perl 5.10:
      Benchmark: timing 100000 iterations of Test... Test: 0 wallclock secs ( 0.02 usr + 0.00 sys = 0.02 CPU) @ 62 +50000.00/ (n=100000) (warning: too few iterations for a reliable count)
      Whooooo ... how good is *that* !!!!!

      Cheers,
      Rob
        In a less trivial example...

        I was benchmarking a module I wrote against one I found on CPAN solving the same problem. I decided to see how using 5.10 compared to using 5.8 at the same time.

        My module (which was already faster) saw a 10% improvement with 5.10. The CPAN module saw a negligible improvement (about 1%) using 5.10.

        using 5.10 didn't hurt and in some circumstances added a nice boost. Depends on how you are using perl.

        Maybe later I'll dig a little deeper and see what the CPAN module did differently to get so little benefit out of 5.10.