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

Christopher Laco claco at chrislaco.com
Thu Dec 27 04:19:51 GMT 2007


Christopher H. Laco wrote:
> Now that this has been declared as a bug in 5.10.0
> (http://perlmonks.com/?node_id=3D658998), and unless mst has any
> objections, I'm going to kick out an updated version of C::A::G that
> uses shift for now.
> =

> The stubborn part of me wants to declare 'perl is broken, not my
> problem' with a side of 'but everything else with =3D @_ is broken too',
> but since this has to do with oodles and oodles of accessors, and not
> knowing when 5.10.1 will hit the street, it should help out for now.
> =

> -=3DChris

Not too shabby after a night of tinkering and an eval tip from mst.
Before and After. No unnecessary variable assignments, imports...evals
anon subs...
Tests pass. Still need to try it under my FBSD perl 5.8.8 and the borked
5.10.0 with the @_ issue.

Also would like to do something like Handel or DBIx::Class test suites
to see if it makes a difference...


> Benchmark: running get_foo, get_inherited_class, get_inherited_object, ge=
t_simple, set_foo, set_inherited_class, set_inherited_object, set_simple fo=
r at least 3 CPU seconds...
>    get_foo:  3 wallclock secs ( 3.01 usr +  0.02 sys =3D  3.03 CPU) @ 612=
308.25/s (n=3D1855294)
> get_inherited_class:  3 wallclock secs ( 3.15 usr +  0.02 sys =3D  3.17 C=
PU) @ 207205.36/s (n=3D656841)
> get_inherited_object:  3 wallclock secs ( 3.14 usr +  0.02 sys =3D  3.16 =
CPU) @ 160767.72/s (n=3D508026)
> get_simple:  2 wallclock secs ( 3.32 usr +  0.01 sys =3D  3.33 CPU) @ 144=
6515.02/s (n=3D4816895)
>    set_foo:  2 wallclock secs ( 3.00 usr +  0.01 sys =3D  3.01 CPU) @ 540=
478.41/s (n=3D1626840)
> set_inherited_class:  3 wallclock secs ( 3.00 usr +  0.02 sys =3D  3.02 C=
PU) @ 615212.58/s (n=3D1857942)
> set_inherited_object:  3 wallclock secs ( 2.98 usr +  0.02 sys =3D  3.00 =
CPU) @ 597675.67/s (n=3D1793027)
> set_simple:  4 wallclock secs ( 3.17 usr +  0.02 sys =3D  3.19 CPU) @ 115=
8235.74/s (n=3D3694772)
> =

> =

> =

> Benchmark: running get_foo, get_inherited_class, get_inherited_object, ge=
t_simple, set_foo, set_inherited_class, set_inherited_object, set_simple fo=
r at least 3 CPU seconds...
>    get_foo:  4 wallclock secs ( 3.29 usr +  0.02 sys =3D  3.31 CPU) @ 944=
515.11/s (n=3D3126345)
> get_inherited_class:  3 wallclock secs ( 3.14 usr +  0.00 sys =3D  3.14 C=
PU) @ 224126.43/s (n=3D703757)
> get_inherited_object:  3 wallclock secs ( 3.14 usr +  0.01 sys =3D  3.15 =
CPU) @ 172029.84/s (n=3D541894)
> get_simple:  2 wallclock secs ( 3.14 usr +  0.01 sys =3D  3.15 CPU) @ 234=
5890.48/s (n=3D7389555)
>    set_foo:  3 wallclock secs ( 3.07 usr +  0.02 sys =3D  3.09 CPU) @ 939=
491.91/s (n=3D2903030)
> set_inherited_class:  4 wallclock secs ( 3.04 usr +  0.02 sys =3D  3.06 C=
PU) @ 779833.33/s (n=3D2386290)
> set_inherited_object:  2 wallclock secs ( 3.02 usr +  0.01 sys =3D  3.03 =
CPU) @ 691498.35/s (n=3D2095240)
> set_simple:  3 wallclock secs ( 3.05 usr +  0.01 sys =3D  3.06 CPU) @ 178=
5796.08/s (n=3D5464536)

-=3DChris

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.scsys.co.uk/pipermail/dbix-class/attachments/20071226/2d=
344a79/signature.pgp


More information about the DBIx-Class mailing list