On Fri, Feb 10, 2012 at 03:27:24PM +0000, Dave Mitchell wrote: > On Thu, Jan 26, 2012 at 12:26:44PM +0000, Tim Bunce wrote: > > I attach two patches; the first replaces dPERINTERP with dMY_THX, > while the second extends this to the DBIS stuff too. > > The headline figure (YMMV etc) is that on a recent threaded perl, these > two patches collectively make my mysql empty test loop twice as fast!!! : > > while ($sth->fetch) { $c++ } > > On a perl < 5.10.0 (before dMY_THX was made much more efficient), the > speedup is less spectacular, but is still about 25%.
That's great news! > I'm assuming that these won't be applied until after the windows() fork > issue is fixed, so think of this email more as a preview. *nods* > [...] > > If anyone knows of a more elegant way to make a function from DBI.xs > available to DBD:: code, please let me know! I hope to take a proper look in the next day or so. > 1 2 3 > ----- ------ ------ > 40.10 - 29.96 5.8.9 threaded, optimised > 37.62 33.98 18.96 5.15.7 threaded, optimised > > 12.85 - 12.55 5.8.9 unthreaded, optimised > 13.41 13.46 12.97 5.15.6 unthreaded, optimised Most excellent! > The big saving between (2) and (3) is due to DBD::mysql still using DBIS; > in particular, for every fetch call. That should be a good reminder to driver authors to avoid using DBIS! Thanks again Dave. Tim.