I’ve been playing around with this idea for a while and I think it would be very interesting concept to complete. The concept is simple and most of the code will be easy. The concept part is take what is most often used and least optimized and rewrite it in C/C++. The easy part is that you can sort of do similar coding structure, albeit with pointers and zvals, but the code can be structured in the same way, well mostly.
The disadvantage of taking an almost 1:1 approach from PHP to C/C++ is that the result code may only be slightly faster (between 15% to 30% increase of performance). Comparable, it might be even faster to instead use C and C++ to the full advantage and use algorithms based completely on them.
However, it would be interesting to enable the Plugin API to execute in linear time with some of the logic. The Plugin API would be a really great first testament of the PHP Extension and it would be interesting to implement other features within it. However, I think just having every function within C/C++ would be a good initial effort.
The initial release has to be released quickly, be optimized as much as possible. If you don’t optimize the C code as well, then you can have just as bad performance. It should be fun, but I hope that I’ll have the fortitude to actually finish the plugin API part to enable benchmarking between the PHP and PHP Extension.
Possibly Related Posts:
- Game Engine Development and Open Source
- Plans for Base CMS
- Project Plans
- Calibre Improvements Part 2
- Usability Testing Software Development