Bankó Ádám wrote:
Pure C code has access to PHP5's low level object API, so it can produce a really intuitive interface (object persistence), that you can't do from PHP code. C code uses a bit less memory and a lot less CPU time
I would hope that the solution for "low level object API" would be that we expose more and more of that to user space. Stuff like being able to force the calling of the parent constructor come to mind, I am sure there are other things more relevant to the topic at hand as well. But yes, its a valid point.
The other issue is performance. For the ORM field I didn't find operation that could be moved out to native code efficiently. Most complex operations need a lot of data, and passing this data to a native function, doing decoding and after it's processed the time needed for recoding would eliminate the performance benefit. For example ADODB could implement the resultset_to_array method in C, because there's minimal overhead on fetching a row from a database resource (negative compared to it's PHP equivalent).
Yeah, you are right .. it might be hard to find things that can be moved to C space and vice versa. I do not know where to draw the line this very second either. I just want to make sure that this option is explored.
I remember that Thies once said, the ultimate goal of the PHP language would be to make everything fast enough in PHP so that everything can be done in user space. All the extension should do is expose third party libs. Of course this might only be a dream, but I think its one of those dreams worth purseing .. even if you never make it.
regards, Lukas -- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php