Re: poor performance (unfair test?)
| From: | Monte Ohrt | Date: | Sun, 28 Jan 2001 01:01:29 +0000 |
| Subject: | Re: poor performance (unfair test?) | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-16@lists.php.net to get a copy of this message | ||
When I ran your test with Smarty, my system was taking an average of
0.336 seconds to complete.
Of this 0.336 seconds, the first 0.303 of it was spent with PHP
compiling the op-tree code. Once Smarty actually executed, it took 0.033
seconds to complete!
So what your test concludes is that phplib class has less code than the
Smarty class, thus PHP compiles it faster. Of course it does, it is a
much simpler templating system. With small tests like these, the simple
template engines will win out every time. Caching solutions such as APC
or Zend Cache would help make these benchmarks a fair test.
What I'd like to see is Smarty benchmarked against a real-world
application, something that does a little more than a simple array loop.
For instance, this entire site is run on the Smarty template engine:
http://nebraska.statepaper.com
I wonder how other template engines would fare with something like this?
Not only speed, but the time it takes to build the templates, and the
managability of them.