[Dbix-class] perl 5.10.0 and Class::Accessor::Grouped

Oleg Pronin syber.rus at gmail.com
Sun Dec 23 12:03:52 GMT 2007


Damn.

The simpliest test:

use Benchmark qw/timethis/;

timethis(-1, sub {test(1,2,3,4,5,6,7,8,9)});
timethis(-1, sub {my @b =3D ('what', 'the', 'fk', 'is', 'goin', 'on', '?')}=
);

sub test {
    my @a =3D @_;
}

And the not so simple results:

5.8.8:
timethis for 1:  2 wallclock secs ( 1.10 usr +  0.00 sys =3D  1.10 CPU) @
499746.50/s (n=3D550502)
timethis for 1:  1 wallclock secs ( 1.05 usr + -0.01 sys =3D  1.05 CPU) @
365810.63/s (n=3D382958)

5.10.0:
timethis for 1:  1 wallclock secs ( 1.04 usr +  0.00 sys =3D  1.04 CPU) @
385313.68/s (n=3D400365)
timethis for 1:  1 wallclock secs ( 1.03 usr +  0.00 sys =3D  1.03 CPU) @
305039.52/s (n=3D314572)

Looks like some perfomance bug in list assignment especially for the '@_'
special array.

Damn it's just a function call (not method) and shifting the params. And it
is so extremely slow.

But this doesn't explain 2 times perfomance penalty in 'lite version' of
set_inherited. There must be something else.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20071223/c1c=
65ac3/attachment.htm


More information about the DBIx-Class mailing list