3 ms·
I'm a bit confused. I thought PHP 7 introduced a JIT, hence why it was much faster (in some cases ~5x faster). How is it different from the PHP 8 JIT? I always
by CraftThatBlock 7y ago
I'm a bit confused. I thought PHP 7 introduced a JIT, hence why it was much faster (in some cases ~5x faster). How is it different from the PHP 8 JIT?
I always assumed that HHVM is what brought JITs to PHP originally, followed by PHP itself.
- jonny383 7y agoI believe there were attempts at implementing JIT in PHP 7 which were unsuccessful against the timeline for release. Instead, they did other optimizations and managed to squeeze quite a bit of performance doing this (comparable to HHVM).
- nkozyra 7y agoI think 7.1 or 7.2 was where it generally beat HHVM.
- CiPHPerCoder 7y agoPHP 7 didn't introduce a JIT. There was an experiment in the 7.x series, but it never surfaced.
- lowercased 7y agoat least some of the speed bump in 7 came from reduced memory usage. IIRC, array pointer size was reduced significantly - something like 120+ bytes per array entry was reduced to ~40 bytes, so far less memory needed to be allocated and managed throughout an execution cycle. I'm sure there were other reasons for speed boosts, but that is one that's stuck in my head for some time.
- rnijveld 7y agoPHP 7.0 was mainly faster because the internal variable data structure (zval) was redefined such that PHP doesn't need to follow so many layers of indirection and doesn't need a full ref-counted heap allocated data structure for every int and bool in your script.