Tim Bunce wrote:
On Thu, Feb 27, 2003 at 03:04:36PM +1100, Stas Bekman wrote:

As I was looking through DBI.xs, I've noticed that dbi_get_attr_k is a very long if/elseif flow. Wouldn't converting it to use switch(*key) (on the first letter) make things a bit faster? Or is the Perl overhead so much more significant that it doesn't worth the effort?


I'm not sure it's really worth the effort, but you're welcome to :)


the only issue is the last else {} block, which I thought could be split of and run if valuesv is undef, but I see that at least RowsInCache may set it to this value, so this won't work. The alternative solution is use goto() to break out ;)


Just init valuesv to Nullsv, add a few valuesv = &sv_undef's in a
few places where an attribute has been recognised but not set,
then you can test for if (!valuesv) at the end.

Thanks Tim,


Is there a cvs access to the latest DBI? I couldn't find any reference to it in the docs or on dbi.perl.org.


__________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com



Reply via email to