PHP Next Generation Project Announced
PHP Next Generation Project Announced
Written by Ian Elliot   
Thursday, 29 May 2014

With all of the fuss about making things go faster in JavaScript, it is probably inevitable that PHP should get a speedy makeover. The PHP group has announced PHP Next Generation.

phplogo

PHP is the language we all love to hate, unless you do actually love it.

Me?

I just use it to get things done and most of the time it does get the job done.  But I have to agree that speed is something that is uppermost on my mind. So while I welcome the improvements that FaceBook is making to the language in the form of HACK, I think that anything that speeds up the core language is good. 

This is where PHP Next Generation (PHP-NG) comes into the picture. The PHP Group has been contemplating how to introduce JIT compilation, which is the technology that has been mostly responsible for increasing the speed of JavaScript.

What they discovered was that JIT implementation was made difficult because of the way some of the core APIs were implemented. So it became a straight choice struggle to implement a JIT in an unfavourable environment or to change the environment - and this is what the new phpng branch is all about.

It doesn't actually implement any JIT compilation, but it still manages to squeeze a 20% speed improvement on running Wordpress. All of this has been achieved using only better memory usage and better core APIs. 

The technical details seem to involve changing the way that data values are stored. The Zend engine allocated all data on the heap and used a complex reference counting scheme. The new implementation stores the data structures on the stack using HashTable buckets. It seems to reduce memory use, heap allocation and to avoid the need for reference counting. 

At the moment it is only an internal project and there is no suggestion that you should deploy it. You can download the code and try it out if you want to. There are also some unsupported extensions and some differences between it and PHP proper, but at the moment most of these all seem to be regarded as bugs. 

There are plans for other improvements, but ultimately the goal has to be to implement JIT compilation and then presumably multi-stage JIT compilation. 

The PHP group seems excited about it:

"The work on phpng, the doors it opens, the conversations it has started, the collaboration it is inspiring, are all worth getting excited about. But, we need to stay grounded, honest, and open; and say that there is much work to do in order to make the "Next Generation" a reality, this is only the start."

So it seems to be a "watch this space" situation - very STNG. 

phplogo

Banner


Ruby Competition Judged By Matz
11/11/2016

The deadline for the 2017 edition of the Japan-based Fukuoka Ruby Award is December 27th and is open to any project that uses Ruby and was developed or completed within the last year. The Grand P [ ... ]



Exploding RoboSimian - What 96 Batteries Can Do
06/11/2016

Footage has recently been released by Nasa of a fireball caused while charging a set of new batteries in RoboSimian, a rescue robot built for the Darpa Robotics Challenge. The robot was completely des [ ... ]


More News

 

 
 
 

blog comments powered by Disqus

 

Last Updated ( Thursday, 29 May 2014 )
 
 

   
Banner
RSS feed of news items only
I Programmer News
Copyright © 2016 i-programmer.info. All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.