Re: why is imp_xxh stored in an SV?

"H.Merijn Brand" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
On Wed, 18 Apr 2012 12:59:25 +0100, Tim Bunce <[email protected]>
wrote:

> On Wed, Apr 18, 2012 at 11:55:45AM +0100, Dave Mitchell wrote:
> > 
> > To keep things as simple as possible, I've left mg_obj pointing to
> > the SV containing the struct, but added using mg_ptr (with mg_len == 0)
> > that caches a direct pointer to the structure, skipping the need to
> > indirect via the SV and PVX(sv).
> > 
> > I've also updated dbih_getcom() to directly handle the common code path
> > when retrieving the handle, rather than doing a dTHX and punting to
> > dbih_getcom2().
> > 
> > This gives a very slight performance boost, and doesn't have any binary or
> > backwards compatibility issues (hopefully).

*\o/*

> Looks good. I've uploadded DBI-1.618_901.tar.gz for cpantesters to chew on.

Built, tested, and installed on my (development) laptop with 
perl 5.014001 on linux (i686-linux-64int-ld)
Linux 3.1.9-1.4-desktop  i386 Core(TM) i7-2620M CPU @ 2.70GHz/800(4) i686  7951 Mb

#########################################################################

DBD::CSV-0.34:

# Using DBI            version 1.619
# Using DBD::File      version 0.40
# Using SQL::Statement version 1.33
# Using Text::CSV_XS   version 0.88
# DBD::CSV                 0.34 using Text::CSV_XS (0.88)
#   DBD::File              0.40 using IO::File (1.15)
#     DBI::DBD::SqlEngine  0.03 using SQL::Statement 1.33
# DBI                      1.619
# OS                       linux (2.6.37.6-31-desktop)
# Perl                     5.014001 (i686-linux-64int-ld)

All tests successful.
Files=23, Tests=709,  2 wallclock secs ( 0.13 usr  0.03 sys +  1.80 cusr  0.17 csys =  2.13 CPU)
Result: PASS

#########################################################################

DBD::Pg-2.19.2:

Configuring DBD::Pg 2.19.2
PostgreSQL version: 90103 (default port: 5432)

# DBI                         Version 1.619
# DBD::Pg                     Version 2.19.2
# Perl                        Version 5.14.1
# OS                          linux
# PostgreSQL (compiled)       90103
# PostgreSQL (target)         90103
# PostgreSQL (reported)       PostgreSQL 9.1.3 on i586-suse-linux-gnu, compiled by gcc (SUSE Linux) 4.6.2, 32-bit
# Default port                5432
# DBI_DSN                     dbi:Pg:
# DBI_USER                    postgres
# Test schema                 dbd_pg_testschema
# LANG                        en_US.UTF-8
# array_nulls                 on
# backslash_quote             safe_encoding
# client_encoding             UTF8
# server_encoding             UTF8
# standard_conforming_strings on
# Adjusted:                   DBI_DSN

All tests successful.
Files=15, Tests=1677, 22 wallclock secs ( 0.29 usr  0.02 sys +  1.07 cusr  0.16 csys =  1.54 CPU)
Result: PASS

#########################################################################

DBD::Oracle-1.42:

Client:
Installing on a linux, Ver#2.6
Using Oracle in /usr/lib/oracle/11.2/client
DEFINE _SQLPLUS_RELEASE = "1102000200" (CHAR)
Oracle version 11.2.0.2 (11.2)

Server
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

#     Carp version is 1.25
#     Config version is undefined
#     DBI version is 1.619
#     Data::Dumper version is 2.131
#     Devel::Peek version is 1.07
#     DynaLoader version is 1.13
#     Encode version is 2.44
#     Exporter version is 5.66
#     ExtUtils::MakeMaker version is 6.62
#     Math::BigInt version is 1.997
#     Oraperl version is 1.44
#     Scalar::Util version is 1.25
#     Test::More version is 0.98
#     Thread::Semaphore version is 2.12
#     strict version is 1.04
#     utf8 version is 1.09
#     vars version is 1.02
#     warnings version is 1.12

All tests successful.
Files=36, Tests=2548, 30 wallclock secs ( 0.75 usr  0.09 sys +  4.31 cusr  0.75 csys =  5.90 CPU)
Result: PASS

#########################################################################

DBD::mysql-4.020:

mysql  Ver 15.1 Distrib 5.3.6-MariaDB, for suse-linux-gnu (i686) using readline 5.1

All tests successful.
Files=40, Tests=890,  7 wallclock secs ( 0.21 usr  0.04 sys +  1.57 cusr  0.24 csys =  2.06 CPU)
Result: PASS

#########################################################################

DBD::Unify-0.83:

on HP-UX 11.23/64 U  rx1620/64 Itanium 2/1600(2) ia64  2037Mb
using perl5.14.2 IA64.ARCHREV_0-LP64-ld

System:           perl5.014002 hpux
UNIFY:            /pro/asql/v83I
Database Version: 38
Revision:         8.3I
Nap Option:       SELECT
Operating System: HP-UX B.11.23 U ia64

Using DBI 1.619 (for perl 5.014002 on IA64.ARCHREV_0-LP64-ld) installed in /u/usr/merijn/.cpan/build/DBI-1.618_901/blib/arch/auto/DBI/

All tests successful.
Files=21, Tests=3721, 34 wallclock secs ( 1.14 usr  0.14 sys + 20.17 cusr  3.80 csys = 25.25 CPU)
Result: PASS


IMPRESSIVE!

> > Note that this and the just-submitted DBIS patch represent the end of
> > my work on improving performance on DBI, (not counting any remedial work
> > that may be required).
> 
> Many thanks again for your contributions to the DBI, Dave.
> They are very much appreciated.

-- 
H.Merijn Brand  http://tux.nl   Perl Monger  http://amsterdam.pm.org/
using perl5.00307 .. 5.14   porting perl5 on HP-UX, AIX, and openSUSE
http://mirrors.develooper.com/hpux/        http://www.test-smoke.org/
http://qa.perl.org   http://www.goldmark.org/jeff/stupid-disclaimers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.