Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:102055 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 52192 invoked from network); 19 Apr 2018 14:10:47 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2018 14:10:47 -0000 Authentication-Results: pb1.pair.com header.from=nicolas.grekas@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=nicolas.grekas@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.218.43 as permitted sender) X-PHP-List-Original-Sender: nicolas.grekas@gmail.com X-Host-Fingerprint: 209.85.218.43 mail-oi0-f43.google.com Received: from [209.85.218.43] ([209.85.218.43:46155] helo=mail-oi0-f43.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D1/7C-38944-463A8DA5 for ; Thu, 19 Apr 2018 10:10:45 -0400 Received: by mail-oi0-f43.google.com with SMTP id e123-v6so4946510oih.13 for ; Thu, 19 Apr 2018 07:10:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:from:date:message-id:subject:to; bh=BN/R/fDPS0HY2e114efa8kboq6QFQcrC+W3xdfcqkBQ=; b=Ie7bcWLZT9VGiLBV4uW9c0Xqo77dycqV4D0otb6YyhKmeiI9GVZCp/xeNG4268rbE0 czTR7PpJZaCzDjhTkDb/cNuF2kdg1CF3UwOFZJTTHhxHeA5uC5nHzvNnNRzaQErbHpvz OUHp+ZYgaKkfglwlOH2fk2d1v53NzDV+YSDmFkDu8Ix/aXE7XJ9Hwgr47tYokw5A74Jy TstLKt3ELbBMI2Ayuyr4pXzi/l5Di0JnWNCE41G2+UPmGBC7iT4qvQVvLxe9pSibEjju ROadddqb+VL2mk7C+8Yn09TEu60OnONi5OMGzvIobP8FEaCXMTPgeSFnEWGLUbEDnCu9 Mekg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:from:date:message-id:subject :to; bh=BN/R/fDPS0HY2e114efa8kboq6QFQcrC+W3xdfcqkBQ=; b=U+P5wiLaZVjSzODe1l7HI7jn8DHKdwxcjtfb0mju5uphytx2LK6UvHHsJ+dvSAGRFx nwQmTf0IC5yjsCzVf9nRWGQjEy5BsfTj5e+7ze9rz+V16fr2h1pgBhb46VnXRrkUYtHw zbLe6USisLaskDE4FG5QVWdtJVCddXZwlwvUfdPjhDOTbCSbC+jnVoQB0/2vBgaZcb1+ qMf2Y/ByGKu3qEjEaldBeByKNtN3kjRZjTrMVk9HVLdlGi2Ja672yQnMs+BC36tOK1HZ 0HJdInLzqgVBuJNH9JqcSeYcBh9Xste6YbPJMyBhrlV2Wex0/bPS5irevDklWdF9cw8k RewQ== X-Gm-Message-State: ALQs6tBL/Em4yRn9UsTfcmDuJLOXPerjYeTZZ/XfJgNuMQbZW2v1Sp8E V9d01Y3OD1cl0X3YzReNANZjgEpVgUk5HkSY/ieC8w== X-Google-Smtp-Source: AIpwx497F/4s3bzI25e8lKae47MMyFKtCy2yXqOJM4KgYUSWgh5cZFBSqhxXEeoLaFoCa8f71OQX/jd89IMJ7L1ASA8= X-Received: by 2002:aca:4a15:: with SMTP id x21-v6mr3922105oia.211.1524147041425; Thu, 19 Apr 2018 07:10:41 -0700 (PDT) MIME-Version: 1.0 Sender: nicolas.grekas@gmail.com Received: by 10.74.97.71 with HTTP; Thu, 19 Apr 2018 07:10:20 -0700 (PDT) Date: Thu, 19 Apr 2018 16:10:20 +0200 X-Google-Sender-Auth: z1arR6v_UMwCSxeWY-c5IE6WLic Message-ID: To: internals@lists.php.net Content-Type: multipart/alternative; boundary="000000000000fd5da9056a3422b0" Subject: Performance optimization ideas for PHP 7.3 From: nicolas.grekas+php@gmail.com (Nicolas Grekas) --000000000000fd5da9056a3422b0 Content-Type: text/plain; charset="UTF-8" Hello internals, During the last months, I've been working on optimizing Symfony/Twig for PHP7. I found a few situations where the PHP engine could likely be optimized, and where it would benefit real-world apps. In each case, these might look like micro-optimizations, but they are not in hot loops. Here are the links to issues I created in the php bug tracker: - Class constants are slow: they should be inlined at runtime - https://bugs.php.net/76178 - Add array_key_exists() to the list of specialy compiled functions - https://bugs.php.net/76148 - Don't trigger copy-on-write when assigning same value - https://bugs.php.net/76150 As a bonus, I also created this one today: - Add hrtime() to zend_try_compile_special_func() - https://bugs.php.net/76241 It would be awesome if those ideas could be implemented in a future PHP version. (I'm sorry I don't have the knowledge to do it myself.) Keep up the good work! Nicolas --000000000000fd5da9056a3422b0--