Re: [PHP-DEV] [RFC] JIT

  104502
February 22, 2019 12:21 krakjoe@gmail.com (Joe Watkins)
Thanks for all the effort Dmitry, it's looking in much better shape.

Cheers
Joe

On Fri, 22 Feb 2019 at 13:18, Dmitry Stogov <dmitry@zend.com> wrote:

> Hi Internals, > > > The RFC and implementation was updated once again. > > > https://wiki.php.net/rfc/jit > > > Now JIT supports PHP builds with compilers without GCC explicit global > register variables extension. > > This means we support CLANG/LLVM (Tested on Linux. Should work on Mac as > well) and MSVC. > > Complete Windows support is not implemented yet, but I don't see any big > problems anymore. > > > ZTS support might be implemented after implementation of proposed TSRM API > improvement. > > > Thanks. Dmitry. > > > ________________________________ > From: Dmitry Stogov <dmitry@zend.com> > Sent: Wednesday, February 13, 2019 16:07 > To: PHP internals > Subject: Re: [PHP-DEV] [RFC] JIT > > Hi Internals, > > According to comments, code reviews and discussions, JIT RFC was > extended with few new sections. > > Please, consider to review the RFC once again. > > https://wiki.php.net/rfc/jit > > Any suggestion for RFC improvement are welcome. > > I'm not going to invest significant time into JIT implementation > improvement itself, at this point. So, ideas are also welcome, but don't > expect to get them implemented tomorrow. > > Thanks. Dmitry. > > On 1/31/19 12:43 PM, Dmitry Stogov wrote: > > Hi Internals, > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > https://wiki.php.net/rfc/jit > > > > > > In the current state it may be included both into PHP-8, where we are > > going to continue active improvement, and into PHP-7.4, as an > > experimental feature. > > > > > > Thanks. Dmitry. > > >
  104504
February 22, 2019 12:48 dmitry@zend.com (Dmitry Stogov)
Thanks to Anatol, who started working on Windows build and "enforced" me 
to implement MSVC support :)

On 2/22/19 3:21 PM, Joe Watkins wrote:
> Thanks for all the effort Dmitry, it's looking in much better shape. > > Cheers > Joe > > On Fri, 22 Feb 2019 at 13:18, Dmitry Stogov <dmitry@zend.com > <mailto:dmitry@zend.com>> wrote: > > Hi Internals, > > > The RFC and implementation was updated once again. > > > https://wiki.php.net/rfc/jit > > > Now JIT supports PHP builds with compilers without GCC explicit > global register variables extension. > > This means we support CLANG/LLVM (Tested on Linux. Should work on > Mac as well) and MSVC. > > Complete Windows support is not implemented yet, but I don't see any > big problems anymore. > > > ZTS support might be implemented after implementation of proposed > TSRM API improvement. > > > Thanks. Dmitry. > > > ________________________________ > From: Dmitry Stogov <dmitry@zend.com <mailto:dmitry@zend.com>> > Sent: Wednesday, February 13, 2019 16:07 > To: PHP internals > Subject: Re: [PHP-DEV] [RFC] JIT > > Hi Internals, > > According to comments, code reviews and discussions, JIT RFC was > extended with few new sections. > > Please, consider to review the RFC once again. > > https://wiki.php.net/rfc/jit > > Any suggestion for RFC improvement are welcome. > > I'm not going to invest significant time into JIT implementation > improvement itself, at this point. So, ideas are also welcome, but don't > expect to get them implemented tomorrow. > > Thanks. Dmitry. > > On 1/31/19 12:43 PM, Dmitry Stogov wrote: > > Hi Internals, > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > https://wiki.php.net/rfc/jit > > > > > > In the current state it may be included both into PHP-8, where we are > > going to continue active improvement, and into PHP-7.4, as an > > experimental feature. > > > > > > Thanks. Dmitry. > > >
  104537
March 1, 2019 12:47 ab@php.net (Anatol Belski)
Hi,

> -----Original Message----- > From: Dmitry Stogov <dmitry@zend.com> > Sent: Friday, February 22, 2019 1:49 PM > To: Joe Watkins <krakjoe@gmail.com> > Cc: PHP internals <internals@lists.php.net>; Anatol Belski <ab@php.net> > Subject: Re: [PHP-DEV] [RFC] JIT > > Thanks to Anatol, who started working on Windows build and "enforced" me > to implement MSVC support :) > Owing to Dmitry's great work on this, the Windows part is now in a very good shape. Zend/bench.php shows at least 4x better performance with Opcache+JIT vs. just Opcache on current master. A dev snapshot x64/NTS of the today's jit-dynasm branch are available here
https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190301/ Regards Anatol
> On 2/22/19 3:21 PM, Joe Watkins wrote: > > Thanks for all the effort Dmitry, it's looking in much better shape. > > > > Cheers > > Joe > > > > On Fri, 22 Feb 2019 at 13:18, Dmitry Stogov <dmitry@zend.com > > <mailto:dmitry@zend.com>> wrote: > > > > Hi Internals, > > > > > > The RFC and implementation was updated once again. > > > > > > https://wiki.php.net/rfc/jit > > > > > > Now JIT supports PHP builds with compilers without GCC explicit > > global register variables extension. > > > > This means we support CLANG/LLVM (Tested on Linux. Should work on > > Mac as well) and MSVC. > > > > Complete Windows support is not implemented yet, but I don't see any > > big problems anymore. > > > > > > ZTS support might be implemented after implementation of proposed > > TSRM API improvement. > > > > > > Thanks. Dmitry. > > > > > > ________________________________ > > From: Dmitry Stogov <dmitry@zend.com <mailto:dmitry@zend.com>> > > Sent: Wednesday, February 13, 2019 16:07 > > To: PHP internals > > Subject: Re: [PHP-DEV] [RFC] JIT > > > > Hi Internals, > > > > According to comments, code reviews and discussions, JIT RFC was > > extended with few new sections. > > > > Please, consider to review the RFC once again. > > > > https://wiki.php.net/rfc/jit > > > > Any suggestion for RFC improvement are welcome. > > > > I'm not going to invest significant time into JIT implementation > > improvement itself, at this point. So, ideas are also welcome, but don't > > expect to get them implemented tomorrow. > > > > Thanks. Dmitry. > > > > On 1/31/19 12:43 PM, Dmitry Stogov wrote: > > > Hi Internals, > > > > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > > > > https://wiki.php.net/rfc/jit > > > > > > > > > In the current state it may be included both into PHP-8, where we are > > > going to continue active improvement, and into PHP-7.4, as an > > > experimental feature. > > > > > > > > > Thanks. Dmitry. > > > > >
  104587
March 5, 2019 14:37 dmitry@zend.com (Dmitry Stogov)
JIT also works for non-ZTS PHP Windows builds now.


Thanks. Dmitry.

________________________________
From: Anatol Belski <weltling@outlook.de> on behalf of Anatol Belski <ab@php.net>
Sent: Friday, March 1, 2019 3:47:07 PM
To: Dmitry Stogov; Joe Watkins
Cc: PHP internals
Subject: RE: [PHP-DEV] [RFC] JIT

Hi,

> -----Original Message----- > From: Dmitry Stogov <dmitry@zend.com> > Sent: Friday, February 22, 2019 1:49 PM > To: Joe Watkins <krakjoe@gmail.com> > Cc: PHP internals <internals@lists.php.net>; Anatol Belski <ab@php.net> > Subject: Re: [PHP-DEV] [RFC] JIT > > Thanks to Anatol, who started working on Windows build and "enforced" me > to implement MSVC support :) > Owing to Dmitry's great work on this, the Windows part is now in a very good shape. Zend/bench.php shows at least 4x better performance with Opcache+JIT vs. just Opcache on current master. A dev snapshot x64/NTS of the today's jit-dynasm branch are available here
https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190301/ Regards Anatol
> On 2/22/19 3:21 PM, Joe Watkins wrote: > > Thanks for all the effort Dmitry, it's looking in much better shape. > > > > Cheers > > Joe > > > > On Fri, 22 Feb 2019 at 13:18, Dmitry Stogov <dmitry@zend.com > > <mailto:dmitry@zend.com>> wrote: > > > > Hi Internals, > > > > > > The RFC and implementation was updated once again. > > > > > > https://wiki.php.net/rfc/jit > > > > > > Now JIT supports PHP builds with compilers without GCC explicit > > global register variables extension. > > > > This means we support CLANG/LLVM (Tested on Linux. Should work on > > Mac as well) and MSVC. > > > > Complete Windows support is not implemented yet, but I don't see any > > big problems anymore. > > > > > > ZTS support might be implemented after implementation of proposed > > TSRM API improvement. > > > > > > Thanks. Dmitry. > > > > > > ________________________________ > > From: Dmitry Stogov <dmitry@zend.com <mailto:dmitry@zend.com>> > > Sent: Wednesday, February 13, 2019 16:07 > > To: PHP internals > > Subject: Re: [PHP-DEV] [RFC] JIT > > > > Hi Internals, > > > > According to comments, code reviews and discussions, JIT RFC was > > extended with few new sections. > > > > Please, consider to review the RFC once again. > > > > https://wiki.php.net/rfc/jit > > > > Any suggestion for RFC improvement are welcome. > > > > I'm not going to invest significant time into JIT implementation > > improvement itself, at this point. So, ideas are also welcome, but don't > > expect to get them implemented tomorrow. > > > > Thanks. Dmitry. > > > > On 1/31/19 12:43 PM, Dmitry Stogov wrote: > > > Hi Internals, > > > > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > > > > https://wiki.php.net/rfc/jit > > > > > > > > > In the current state it may be included both into PHP-8, where we are > > > going to continue active improvement, and into PHP-7.4, as an > > > experimental feature. > > > > > > > > > Thanks. Dmitry. > > > > >
  104589
March 5, 2019 21:52 ab@php.net (Anatol Belski)
I've uploaded a build from the latest branch state https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190305/, NTS/x64/SSE2/PGO. For PGO training, I've omitted some apps like Drupal/Symfony, as they're not yet compatible with 8.0, still a slight improvement with Zend/bench.php does show.

Thanks

Anatol

> -----Original Message----- > From: Dmitry Stogov <dmitry@zend.com> > Sent: Tuesday, March 5, 2019 3:38 PM > To: PHP internals <internals@lists.php.net> > Cc: Anatol Belski <ab@php.net>; Joe Watkins <krakjoe@gmail.com> > Subject: Re: [PHP-DEV] [RFC] JIT > > JIT also works for non-ZTS PHP Windows builds now. > > > > > > Thanks. Dmitry. > > > ________________________________ > > From: Anatol Belski <weltling@outlook.de> on behalf of Anatol Belski > <ab@php.net> > Sent: Friday, March 1, 2019 3:47:07 PM > To: Dmitry Stogov; Joe Watkins > Cc: PHP internals > Subject: RE: [PHP-DEV] [RFC] JIT > > Hi, > > > -----Original Message----- > > From: Dmitry Stogov <dmitry@zend.com> > > Sent: Friday, February 22, 2019 1:49 PM > > To: Joe Watkins <krakjoe@gmail.com> > > Cc: PHP internals <internals@lists.php.net>; Anatol Belski > > <ab@php.net> > > Subject: Re: [PHP-DEV] [RFC] JIT > > > > Thanks to Anatol, who started working on Windows build and "enforced" > > me to implement MSVC support :) > > > Owing to Dmitry's great work on this, the Windows part is now in a very > good shape. Zend/bench.php shows at least 4x better performance with > Opcache+JIT vs. just Opcache on current master. A dev snapshot x64/NTS of > the today's jit-dynasm branch are available here > > https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190301/ > > Regards > > Anatol > > > On 2/22/19 3:21 PM, Joe Watkins wrote: > > > Thanks for all the effort Dmitry, it's looking in much better shape. > > > > > > Cheers > > > Joe > > > > > > On Fri, 22 Feb 2019 at 13:18, Dmitry Stogov <dmitry@zend.com > > > <mailto:dmitry@zend.com>> wrote: > > > > > > Hi Internals, > > > > > > > > > The RFC and implementation was updated once again. > > > > > > > > > https://wiki.php.net/rfc/jit > > > > > > > > > Now JIT supports PHP builds with compilers without GCC explicit > > > global register variables extension. > > > > > > This means we support CLANG/LLVM (Tested on Linux. Should work on > > > Mac as well) and MSVC. > > > > > > Complete Windows support is not implemented yet, but I don't see any > > > big problems anymore. > > > > > > > > > ZTS support might be implemented after implementation of proposed > > > TSRM API improvement. > > > > > > > > > Thanks. Dmitry. > > > > > > > > > ________________________________ > > > From: Dmitry Stogov <dmitry@zend.com <mailto:dmitry@zend.com>> > > > Sent: Wednesday, February 13, 2019 16:07 > > > To: PHP internals > > > Subject: Re: [PHP-DEV] [RFC] JIT > > > > > > Hi Internals, > > > > > > According to comments, code reviews and discussions, JIT RFC was > > > extended with few new sections. > > > > > > Please, consider to review the RFC once again. > > > > > > https://wiki.php.net/rfc/jit > > > > > > Any suggestion for RFC improvement are welcome. > > > > > > I'm not going to invest significant time into JIT implementation > > > improvement itself, at this point. So, ideas are also welcome, but don't > > > expect to get them implemented tomorrow. > > > > > > Thanks. Dmitry. > > > > > > On 1/31/19 12:43 PM, Dmitry Stogov wrote: > > > > Hi Internals, > > > > > > > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > > > > > > > https://wiki.php.net/rfc/jit > > > > > > > > > > > > In the current state it may be included both into PHP-8, where we are > > > > going to continue active improvement, and into PHP-7.4, as an > > > > experimental feature. > > > > > > > > > > > > Thanks. Dmitry. > > > > > > >
  104615
March 7, 2019 16:11 theodorejb@outlook.com (Theodore Brown)
On Tuesday, March 5, 2019 3:52 PM, Anatol Belski <ab@php.net> wrote:

> > On Thursday, January 31, 2019 12:43 PM, Dmitry Stogov wrote: > > > Hi Internals, > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > https://wiki.php.net/rfc/jit > > > > > > In the current state it may be included both into PHP-8, where we are > > > going to continue active improvement, and into PHP-7.4, as an > > > experimental feature. > > > > > > Thanks. Dmitry. > > On Tuesday, March 5, 2019 3:38 PM, Dmitry Stogov <dmitry@zend.com> wrote: > > > JIT also works for non-ZTS PHP Windows builds now. > > > > Thanks. Dmitry. > > I've uploaded a build from the latest branch state > https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190305/, > NTS/x64/SSE2/PGO. For PGO training, I've omitted some apps like > Drupal/Symfony, as they're not yet compatible with 8.0, still a > slight improvement with Zend/bench.php does show. > > Thanks > > Anatol
I downloaded the Windows build and added the following settings to php.ini: opcache.jit_buffer_size=10000000 opcache.jit=1205 I'm not sure if these are ideal settings or not, but they produced a nearly 3x speed improvement in the spectral-norm benchmark with $n=100 (https://benchmarksgame-team.pages.debian.net/benchmarksgame/program/spectralnorm-php-1.html). Unfortunately I can't test with our real-world app since it relies on the SQL Server extension (https://github.com/Microsoft/msphpsql) which doesn't support PHP 8 yet. I guess this would be one benefit to having the JIT be an experimental feature in PHP 7.4 - extensions will likely support it long before they support PHP 8 which will make it possible to test a lot more real-world use cases. Thanks, Theodore Brown
  104616
March 7, 2019 21:40 ab@php.net (Anatol Belski)
Hi Theodore,

> -----Original Message----- > From: Theodore Brown <theodorejb@outlook.com> > Sent: Thursday, March 7, 2019 5:11 PM > To: Anatol Belski <ab@php.net>; Dmitry Stogov <dmitry@zend.com>; PHP > internals <internals@lists.php.net> > Cc: Joe Watkins <krakjoe@gmail.com> > Subject: Re: [PHP-DEV] [RFC] JIT > > On Tuesday, March 5, 2019 3:52 PM, Anatol Belski <ab@php.net> wrote: > > > > On Thursday, January 31, 2019 12:43 PM, Dmitry Stogov wrote: > > > > Hi Internals, > > > > > > > > I'm glad to finally propose including JIT into PHP. > > > > > > > > https://wiki.php.net/rfc/jit > > > > > > > > In the current state it may be included both into PHP-8, where we > > > > are going to continue active improvement, and into PHP-7.4, as an > > > > experimental feature. > > > > > > > > Thanks. Dmitry. > > > > On Tuesday, March 5, 2019 3:38 PM, Dmitry Stogov <dmitry@zend.com> > wrote: > > > > > JIT also works for non-ZTS PHP Windows builds now. > > > > > > Thanks. Dmitry. > > > > I've uploaded a build from the latest branch state > > https://windows.php.net/downloads/snaps/ostc/jit-dynasm/20190305/, > > NTS/x64/SSE2/PGO. For PGO training, I've omitted some apps like > > Drupal/Symfony, as they're not yet compatible with 8.0, still a slight > > improvement with Zend/bench.php does show. > > > > Thanks > > > > Anatol > > I downloaded the Windows build and added the following settings to php.ini: > opcache.jit_buffer_size=10000000 > opcache.jit=1205 > > I'm not sure if these are ideal settings or not, but they produced a nearly 3x > speed improvement in the spectral-norm benchmark with $n=100 > (https://benchmarksgame- > team.pages.debian.net/benchmarksgame/program/spectralnorm-php- > 1.html). > > Unfortunately I can't test with our real-world app since it relies on the SQL > Server extension (https://github.com/Microsoft/msphpsql) > which doesn't support PHP 8 yet. > > I guess this would be one benefit to having the JIT be an experimental > feature in PHP 7.4 - extensions will likely support it long before they support > PHP 8 which will make it possible to test a lot more real-world use cases. > Thanks for sharing this! Once the required extension becomes available, a snapshot could be created for the further tests. Otherwise I had Wordpress running and several other simple apps, so those can be used for the tests, too.
Regards Anatol