Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:69802 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 47622 invoked from network); 23 Oct 2013 12:36:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 23 Oct 2013 12:36:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain zend.com from 74.125.82.173 cause and error) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 74.125.82.173 mail-we0-f173.google.com Received: from [74.125.82.173] ([74.125.82.173:55792] helo=mail-we0-f173.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id B5/8A-10840-7C2C7625 for ; Wed, 23 Oct 2013 08:36:24 -0400 Received: by mail-we0-f173.google.com with SMTP id u57so723212wes.4 for ; Wed, 23 Oct 2013 05:36:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=nV1rMcZlXIjvlC2A/Nx+Y2Y098NuWVI8KJE+jrRlcYc=; b=kXj3a3ipNFcw/7nG7HKQzYQAHsV6xkjA9rhYmAHVJOrY9PW7uXPgy9ofeR2C/s42v3 CQQmlGVLLUYhnn/xOKtmkW6W+YDBWHeQRih6q42EiBvd3iPpSAxiQEBXxeVKbPTueYMK Q54bCUqmjgZY4tZFGU1JdLX0rIG4fvwpajrhsORj0nfZuihYHjqy9fH2u13dwvNkbamq zsNJJ490mSpYdfKtb95lOQR4L7HleDzcX3j50uSJf+2Cy4SS9/0PXIKTZmX9NgdUzAxt e3qBaMg/04uzwok3bcNs04woQcjvZoQN6I9BS2l5qDr8Bysuvn9m7dtJweA3AAU5fi01 XKAQ== X-Gm-Message-State: ALoCoQmSIotuK2H6nR+77zsLRNGEsVBEHjfHdP7yv9CEAXC8CartBjgD3wErrWZU3yCK8Ov+i5LoHYZk3Yp14ihmzoJ1qlmWN2pfxZi3LL6IqSRFdcVPoG7dnDUOQqZmnDUOJolg5GAO MIME-Version: 1.0 X-Received: by 10.194.173.163 with SMTP id bl3mr1564375wjc.10.1382531780119; Wed, 23 Oct 2013 05:36:20 -0700 (PDT) Received: by 10.227.214.144 with HTTP; Wed, 23 Oct 2013 05:36:20 -0700 (PDT) Date: Wed, 23 Oct 2013 16:36:20 +0400 Message-ID: To: Julien Pauli , David Soria Parra , Stas Malyshev , PHP Internals Content-Type: multipart/alternative; boundary=089e013c6220a5258404e967c30a Subject: Improved performance of array_maerge() and func_get_args() From: dmitry@zend.com (Dmitry Stogov) --089e013c6220a5258404e967c30a Content-Type: text/plain; charset=UTF-8 Hi, I'm proposing two simple patches that eliminate a lot of useless zval copying. For example they remove only about 800 calls to zend_hash_copy() (25%) on each request to wordpress-3.6.0 home page and make it 2-4% faster. It's not a questions about master branch, but I think it is also safe to commit them into PHP-5.4 and PHP-5.5. Any objections? https://gist.github.com/dstogov/7117623 https://gist.github.com/dstogov/7117649 Thanks. Dmitry. --089e013c6220a5258404e967c30a--