Re: Some more plane hacking...

From: Date: Thu, 16 Aug 2001 00:20:17 +0000
Subject: Re: Some more plane hacking...
References: 1  Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-1522@lists.php.net to get a copy of this message
At 05:10 PM 8/15/01 -0700, Rasmus Lerdorf wrote:
I did a bit of playing around with Smarty on the plane today. Basically I wrote a small C extension that creates the base Smarty class and initializes many of the variables. Then I extended that base Smarty class from user space with the existing user-space Smarty class stuff. The result was a 25% speedup in my limited ab tests. There is still a bunch of stuff in userspace that could easily be moved into the extension and thus provide more of a speedup.
Do you mean that you implemented part of Smarty class in C or that you instantiate existing Smarty class in C?
I also had a look at the pear DB class, although I didn't start writing any code for that one. I think Stig mentioned he was planning on pulling some of that into a PHP extension. But looking around in Pear there are a number of classes that could benefit greatly from a bit of help from a C extension. What is the overall feeling here about converting some of this stuff to C?
It really depends, I guess. One reason Smarty is so great :) is because Monte and I could easily hack on the PHP implementation of it -- having it in C would severely limit that ability to change around code and see the effects. I can see the speed benefits though. -Andrei

« previous php.pear.dev (#1522) next »