Live data from Hacker News

Perl 5.14 released

news.perlfoundation.org

21–27 of 27 posts

Re: Perl 5.14 released

#21
post #9

Earlier quoted context omitted.

We have been testing perl 5.14 RC2 version in one of our dev box during last week, and the performance improvements are just monstrous! Got a 20-30% faster app straight out of the box, and some hefty memory savings. It's really noticeable on smaller scripts. Can't wait to put 5.14 in production!

20% to 30% has typically been the difference between threaded and non-threaded perl interpreters. Have you checked if both your old and the new perl have the same threading settings? I expected some performance improvements from the upgrade, but I found 20% to be pretty surprising -- still I won't complain :-)

Nope, no useithreads in either of them. We haven't build a threaded perl in ages.

The noted speed improvement is for a hefty Catalyst + DBIC + Moose app. Also seen similar performance improvements in a smaller Dancer app we have. Maybe it's related to the BUFSIZ changes.

Re: Perl 5.14 released

#22
post #12

I would love to see benchmarks against ruby 1.9.2. Perl always had comparable speed to ruby 1.8.6 with lower memory consumption and cpu usage. Now hopefully it'll be equivalent to ruby 1.9.2.

Here are some quick, unsophisticated benchmarks of a "Hello World" test web server. I ran it in our dev server (Centos 5.3 i386). Ran with ab -t 30 a few times and chose the fastest of the batch. Perl 5.14, Dancer 1.3040, HTTP::Server::PSGI: Requests per second: 856.48 [#/sec] (mean) Memory after tests: 11296 (VSZ) 7632 (RSS) Ruby 1.9.2, Sinatra 1.2.6, WEBRick 1.3.1: Requests per second: 402.72 [#/sec] (mean) Memory…

I'm not sure using time is an accurate measurement of the speed of looping here since there is the cost of starting up the interpreter, but fun nonetheless to see.

Re: Perl 5.14 released

#23
post #12

I would love to see benchmarks against ruby 1.9.2. Perl always had comparable speed to ruby 1.8.6 with lower memory consumption and cpu usage. Now hopefully it'll be equivalent to ruby 1.9.2.

If you check (historically) the benchmarks on http://shootout.alioth.debian.org/ then: * perl5 was always a 2-4 times faster than than ruby 1.8 * perl5 & ruby 1.9 are comparable usually swapping places on different "Which programming languages are fastest?" benchmarks * When taking in above speed benchmarks, memory used & code-used then perl5 just nudges in front of ruby 1.9. See "Which programming language is best?"

How did you check (historically) ?

Re: Perl 5.14 released

#24
post #12

I would love to see benchmarks against ruby 1.9.2. Perl always had comparable speed to ruby 1.8.6 with lower memory consumption and cpu usage. Now hopefully it'll be equivalent to ruby 1.9.2.

Here are some quick, unsophisticated benchmarks of a "Hello World" test web server. I ran it in our dev server (Centos 5.3 i386). Ran with ab -t 30 a few times and chose the fastest of the batch. Perl 5.14, Dancer 1.3040, HTTP::Server::PSGI: Requests per second: 856.48 [#/sec] (mean) Memory after tests: 11296 (VSZ) 7632 (RSS) Ruby 1.9.2, Sinatra 1.2.6, WEBRick 1.3.1: Requests per second: 402.72 [#/sec] (mean) Memory…

I don't think the problem is that "this is completely unscientific."

It just seems really silly ;-)

Re: Perl 5.14 released

#25
post #9
post #8

There are many important updates regarding memory use. That's an interesting improvement especially when you have long lasting Perl script in distributed environment. Especially that we can gain some memory on some data structure, it's always an interesting gain.

We have been testing perl 5.14 RC2 version in one of our dev box during last week, and the performance improvements are just monstrous! Got a 20-30% faster app straight out of the box, and some hefty memory savings. It's really noticeable on smaller scripts. Can't wait to put 5.14 in production!

What older version were you comparing to?

Re: Perl 5.14 released

#26
post #6

A fuller changelog is here: http://perl5.git.perl.org/perl.git/blob/HEAD:/pod/perldelta.... There's a lot going on here, but a couple jump out at me: * Non-destructive substitutions (with a new 'r' option) * An experimental feature that allows you to perform operations like push , pop , splice , keys and company directly on (unblessed) array and hash references. (There's a pretty strong warning that this feature is s…

Hmmm... perldoc.perl.org doesn't have 5.14 as an option yet. I assume that the 'r' option is meant to prevent things like this: my @list = (... stuff ...); my @other_list = map { s/SOMETHING//; $_ } @list; (The result of this is that @other_list and @list are equal because the substitution destructively affects the original list.)

Along with that, it's also for doing things like

  my $old = "foo"; my $new = $old =~ s/foo/bar/r;
$old still contains "foo" and $new contains "bar", but inside a map should be great as well.
Post reply on HN