[CDBI] Make name_lc go fast

Michael G Schwern schwern at pobox.com
Wed Apr 4 03:34:05 BST 2007

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.

More information about the ClassDBI mailing list