[CDBI] Make name_lc go fast

Aaron Trevena aaron.trevena at gmail.com
Wed Apr 4 16:40:47 BST 2007

On 04/04/07, Michael G Schwern <schwern at pobox.com> wrote:
> FWIW name_lc() often pops up high in my profiles.  Its called as part of the
> column stringification override which is called very, very often.  So yes, it
> would be nice to optimize it away.
> There's probably no harm in simply changing the stringification sub to be simply:
>     sub { lc shift->name };
> That would remove a layer of method calls.
> I can't think of why anyone would want to override the method which lower
> cases the name.

I've over-ridden a lot of cdbi internals since I've been using it, and
that is definately not something I'd ever consider over-riding.

I kind of assumed that was all it was doing anyway - so I'd be glad to
see it optimised away as much as possible, but I still don't see it as
a significant bottleneck.



LAMP System Integration, Development and Hosting

More information about the ClassDBI mailing list