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.
Tim.