Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:37217 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89792 invoked from network); 25 Apr 2008 15:30:50 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Apr 2008 15:30:50 -0000 Authentication-Results: pb1.pair.com header.from=php_lists@realplain.com; sender-id=unknown Authentication-Results: pb1.pair.com smtp.mail=php_lists@realplain.com; spf=permerror; sender-id=unknown Received-SPF: error (pb1.pair.com: domain realplain.com from 209.151.69.1 cause and error) X-PHP-List-Original-Sender: php_lists@realplain.com X-Host-Fingerprint: 209.151.69.1 liberty.vosn.net Linux 2.4/2.6 Received: from [209.151.69.1] ([209.151.69.1:56127] helo=liberty.vosn.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 01/DC-18287-929F1184 for ; Fri, 25 Apr 2008 11:30:50 -0400 Received: from d1-207.rt-bras.wnvl.centurytel.net ([69.179.128.207]:52373 helo=pc1) by liberty.vosn.net with smtp (Exim 4.68) (envelope-from ) id 1JpPss-0006dJ-4u; Fri, 25 Apr 2008 09:30:46 -0600 Message-ID: <018601c8a6e9$54fb8660$0201a8c0@pc1> To: , "Andrey Hristov" References: <014b01c8a6db$57d53ba0$0201a8c0@pc1> <4811E99B.6020004@hristov.com> Date: Fri, 25 Apr 2008 10:30:43 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1914 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - liberty.vosn.net X-AntiAbuse: Original Domain - lists.php.net X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - realplain.com Subject: Re: [PHP-DEV] [PATCH] More array filling optimizations From: php_lists@realplain.com ("Matt Wilmas") Hi Andrey, ----- Original Message ----- From: "Andrey Hristov" Sent: Friday, April 25, 2008 > Hi, > [...] > heh, this optimisitations was one of the pluses mysqlnd had over > mysqli/libmysql. I am using the following macro: > > #if PHP_MAJOR_VERSION < 6 > #define mysqlnd_array_init(arg, field_count) \ > { \ > ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\ > zend_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, 0); \ > Z_TYPE_P(arg) = IS_ARRAY;\ > } > #else > #define mysqlnd_array_init(arg, field_count) \ > { \ > ALLOC_HASHTABLE_REL(Z_ARRVAL_P(arg));\ > zend_u_hash_init(Z_ARRVAL_P(arg), (field_count), NULL, ZVAL_PTR_DTOR, > 0, 0);\ > Z_TYPE_P(arg) = IS_ARRAY;\ > } > #endif > Ah yes, I see. :-) Yeah, any of the database functions (in all DB exts.) that create/return arrays are one of the obvious things I had in mind to change, but hadn't come across your mysqlnd "workaround," heh. Just knew that plain array_init() is used in mysql/mysqli, pgsql, sqlite, etc... - Matt