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


Google's Blink Not Implementing W3C Pointer Events
18/08/2014

Since it split away from the WebKit render engine to create Blink, Google has been free to pick and choose what gets implemented. Now we have the news that it has decided to ignore the W3C spec for to [ ... ]



JetBrains Upsource
14/08/2014

A browser-based code viewer designed to be a team developer tool has been released in an early access program by JetBrains.


More News

 

blog comments powered by Disqus

 

Last Updated ( Thursday, 29 May 2014 )
 
 

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