Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:95531 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50998 invoked from network); 1 Sep 2016 11:57:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Sep 2016 11:57:31 -0000 Authentication-Results: pb1.pair.com smtp.mail=dmitry@zend.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=dmitry@zend.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain zend.com designates 104.47.36.136 as permitted sender) X-PHP-List-Original-Sender: dmitry@zend.com X-Host-Fingerprint: 104.47.36.136 mail-sn1nam02on0136.outbound.protection.outlook.com Received: from [104.47.36.136] ([104.47.36.136:15829] helo=NAM02-SN1-obe.outbound.protection.outlook.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 19/00-47600-8A718C75 for ; Thu, 01 Sep 2016 07:57:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=RWSoftware.onmicrosoft.com; s=selector1-zend-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=WNF1lvmUcYWP2980EdNginO6Uxd1QeRKG0g5ZvnR5Co=; b=fpgCh/4i99G7r/oU1/9vLnv+dihiHLQML2/eQ/AloHakrrN5hU42WH3E1HHMTPX5DV2kKHja0Anuu51agTpF7WL0izXLurV83GJjwX54+fDuXSISOv4XUnSV/bP7LxfWHhA9ZoOZruJWZOpdGGOm55qBjmz7BL7+kZMNLeHwdQg= Received: from BY2PR0201MB1784.namprd02.prod.outlook.com (10.163.72.26) by BL2PR02MB292.namprd02.prod.outlook.com (10.141.90.149) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA_P384) id 15.1.587.13; Thu, 1 Sep 2016 11:57:25 +0000 Received: from BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) by BY2PR0201MB1784.namprd02.prod.outlook.com ([10.163.72.26]) with mapi id 15.01.0587.018; Thu, 1 Sep 2016 11:57:24 +0000 To: PHP internals list CC: Zeev Suraski , Xinchen Hui Thread-Topic: JIT for PHP project Thread-Index: AQHSBEck0ew/1MGBGkeGfQZM7o1BKQ== Date: Thu, 1 Sep 2016 11:57:24 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=dmitry@zend.com; x-originating-ip: [132.245.81.165] x-ms-office365-filtering-correlation-id: 3559786d-0c51-4d09-480d-08d3d25f232e x-microsoft-exchange-diagnostics: 1;BL2PR02MB292;6:gpyPrQwfwIS1KQUS9LsjHn6X2fVr2Wyy1u031qfEXB4LQvgyihYcURaZ80Mkla8D8wJv9nt5GKYNlnWJri05XSlb1HrAOY5EmmoiTRVmmcuHEYwYewZmsnBIBs2ghGL2C97vUU0MIbdMagWYnA7EWbOMjXLO91uDw7R6/DKvinpT2ynbze+rGwxC5dDPCD5m7RpSiOQNiH96xYhLZSyOHGzDNvh8Vh3qXV2VGuOvnTMpe7st2nchI9scScdl28nGsG6/Svk7H6ke18360Q71fxV/c54Dbqj6bynbx/Mdfu0=;5:jp5qKJg24tyZTSDGNyAt2vFzv0TWyJaHNodG7wWQKyUu6ImUztYzjQJUBdfx94ufqpHIqpCEEXVS1t8Pcw2GnIhNI9d0EQmwQuVd3kLjU3DxKavjxyOswZaiQxuO3KZTdqRbTUo97KRrKj76MRK4zw==;24:oYs9x8QDRkPRpqhcD1Avak2e/90xBI1V63wYOb373o6RECLY2iTOtFXIcEuSQDfMlW4fcFyyCTYZLRDfeuVahGk68h3Cy/Ts95WB3GCyH/k=;7:D9CTsvWQvTWpyS4MYad59RFK/rdQVvDr1VgKxYsPryaIED81h3C3BNgmaf8C1dMeaLKpCcyHVe9i71JM5gPTaLnv6mKcIvQB49ADKD8W+uD+OE67XrmANUVELni7Z8JfhG3iYhyymS7Cf50ce5F5BQhIa3jJSxFpTI136hN0ndejXAvSRqKRxnFGielXrU1vdZLmtGWLOzcwKUHty+KKCofldME7CqKHftZudsHhlMUb34S9k23b6ygNWLN6jcjR x-microsoft-antispam: UriScan:;BCL:0;PCL:0;RULEID:;SRVR:BL2PR02MB292; x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(166708455590820); x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040176)(601004)(2401047)(5005006)(8121501046)(3002001)(10201501046);SRVR:BL2PR02MB292;BCL:0;PCL:0;RULEID:;SRVR:BL2PR02MB292; x-forefront-prvs: 0052308DC6 x-forefront-antispam-report: SFV:NSPM;SFS:(10019020)(7916002)(189002)(199003)(5002640100001)(7846002)(76576001)(81156014)(81166006)(68736007)(122556002)(19627405001)(8676002)(19617315012)(66066001)(8936002)(87936001)(9686002)(229853001)(450100001)(110136002)(3480700004)(7906003)(107886002)(7736002)(7696003)(33656002)(15975445007)(189998001)(16799955002)(77096005)(3846002)(102836003)(6116002)(92566002)(3280700002)(10400500002)(16236675004)(4001430100002)(3660700001)(586003)(5660300001)(4326007)(101416001)(106356001)(86362001)(2906002)(97736004)(105586002)(106116001)(19580395003)(99286002)(2900100001)(19625215002)(50986999)(54356999)(74316002);DIR:OUT;SFP:1102;SCL:1;SRVR:BL2PR02MB292;H:BY2PR0201MB1784.namprd02.prod.outlook.com;FPR:;SPF:None;PTR:InfoNoRecords;MX:1;A:1;LANG:en; received-spf: None (protection.outlook.com: zend.com does not designate permitted sender hosts) spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM Content-Type: multipart/alternative; boundary="_000_BY2PR0201MB178400E39CDE5251E0945FFDBFE20BY2PR0201MB1784_" MIME-Version: 1.0 X-OriginatorOrg: zend.com X-MS-Exchange-CrossTenant-originalarrivaltime: 01 Sep 2016 11:57:24.0080 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 32210298-c08b-4829-8097-6b12c025a892 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL2PR02MB292 Subject: JIT for PHP project From: dmitry@zend.com (Dmitry Stogov) --_000_BY2PR0201MB178400E39CDE5251E0945FFDBFE20BY2PR0201MB1784_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi @internals, I'm glad to say that we have started a new JIT for PHP project and hope to = deliver some useful results for the next PHP version (probably 8.0). We are very early in the process and for now there isn't any real performan= ce improvement yet. So far we spent just 2 weeks mainly working on JIT inf= rastructure for x86/x86_64 Linux (machine code generation, disassembling, d= ebugging, profiling, etc), and we especially made the JIT code-generator as= minimal and simple as possible. The current state, is going to be used as = a starting point for research of different JIT approaches and their usabili= ty for PHP. The code is available at: https://github.com/zendtech/php-src/tree/jit-dyna= sm/ext/opcache/jit The sources may be built and tested as regular PHP (no any special external= dependencies required). JIT itself is implemented as a part of Opcache. You may try it in action: sapi/cli/php -d opcache.jit_buffer_size=3D32M Zend/bench.php sapi/cli/php -d opcache.jit_buffer_size=3D32M -d opcache.jit_debug=3D1 Zend= /bench.php 2>&1 | less As I mentioned we didn't try to achieve any real performance improvement ye= t, although we do currently see 20% speedup on bench.php, but a bit of a sl= owdown on real-life apps. Wish us luck :) Thanks. Dmitry. --_000_BY2PR0201MB178400E39CDE5251E0945FFDBFE20BY2PR0201MB1784_--