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

Aaron Crane dbix-class at aaroncrane.co.uk
Fri Dec 21 11:46:02 GMT 2007


Oleg Pronin writes:
> Benchmark: running aa, bb, cc, dd, ee for at least 1 CPU seconds...
>         aa:  1 wallclock secs ( 1.10 usr +  0.00 sys =  1.10 CPU) @ 235174.13/s (n=259059)
>         bb:  1 wallclock secs ( 1.09 usr +  0.00 sys =  1.09 CPU) @ 100662.86/s (n=110100)
>         cc:  2 wallclock secs ( 1.07 usr +  0.00 sys =  1.07 CPU) @ 102867.15/s (n=110100)
>         dd:  1 wallclock secs ( 1.08 usr +  0.00 sys =  1.08 CPU) @ 102121.74/s (n=110100)
>         ee:  1 wallclock secs ( 1.06 usr +  0.00 sys =  1.06 CPU) @ 103623.53/s (n=110100)

I'm afraid I haven't been paying enough attention to this to know if
I'm missing something, but this code in your benchmark looks very odd:

  timethese(-1, {
      aa => sub {mro::get_linear_isa('AA', 'c3')},
      bb => sub {mro::get_linear_isa('BB', 'c3')},
      cc => sub {mro::get_linear_isa('BB', 'c3')},
      dd => sub {mro::get_linear_isa('BB', 'c3')},
      ee => sub {mro::get_linear_isa('BB', 'c3')},
  });

Presumably the last three occurrences of 'BB' should be 'CC', 'DD',
and 'EE', respectively, no?

The two benchmark scripts behave the same in that respect.

-- 
Aaron Crane



More information about the DBIx-Class mailing list