FYI, I've added this to the DBI::PurePerl docs:
By way of example... the test.pl script in the DBI source
distribution has a simple benchmark that just does:
my $null_dbh = DBI->connect('dbi:NullP:','','');
my $i = 10_000;
$null_dbh->prepare('') while $i--;
In other words just prepares a statement, creating and destroying
a statement handle, over and over again. Using the real DBI the loop
runs at ~4550 handles per second but DBI::PurePerl can only manage
~230 per second on the same machine.
I'm sure we can improve the performance with more work, but we'll
be lucky to more than double it.
When I first wrote that a couple of hours ago it said ~150 per second.
There are a few more things I can do to speed it up but I still think
"we'll be lucky to more than double it".
Tim.