Re: [CDBI] Make name_lc go fast
"Aaron Trevena" <[email protected]> Wed, 4 Apr 2007 16:40:47 +0100
| Newsgroups | gmane.comp.lang.perl.modules.class-dbi |
|---|---|
| Message-ID | <[email protected]> |
On 04/04/07, Michael G Schwern <[email protected]> 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. Cheers, A. -- http://www.aarontrevena.co.uk LAMP System Integration, Development and Hosting