RE: Smarty 2.0 prototype: new benchmarks for phplib
| From: | Monte Ohrt | Date: | Sun, 17 Feb 2002 09:10:23 +0000 |
| Subject: | RE: Smarty 2.0 prototype: new benchmarks for phplib | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2703@lists.php.net to get a copy of this message | ||
> -----Original Message-----
> From: Peter Bowyer [mailto:reywob@f2s.com]
> Sent: Sunday, February 17, 2002 2:17 AM
> To: Monte Ohrt; smarty@lists.ispi.net
> Subject: Re: [smarty] Smarty 2.0 prototype: new benchmarks for phplib
>
>
> At 03:24 PM 2/16/02 -0600, Monte Ohrt wrote:
> >The benchmark page is updated with benchmarks for PHPLib.
> >
> >http://www.phpinsider.com/benchmarks/
>
> I'm really surprised how well phpLib does in these tests - it beats
> un-accelerated Smarty in most of them! Shame that Smarty can't
> run faster
> when unaccelerated, but with the amount of code involved I guess it's
> impossible :-)
Yes it does quite well. Of course the question is, just how close to a "real
world" situation are these benchmark tests? Most of them are quite simple,
and probably not too similar to something you might see in a real template
such as non-similar variables, nested templates, looped sections, and some
of the more complicated things Smarty takes care of that may prove much more
difficult to do with other template languages. Look at the speed difference
just for looping an array. I might try to construct a benchmark based on a
real template page that contains most common situations and see how they
compare. But yeah, it would be cool to be fastest in any situation but there
is always a trade-off.
>
> Did the Smarty benchmarks include the compilation time of the
> templates, or
> was that done before the benchmark? In most situations the template's
> going to have been compiled beforehand, so maybe this shouldn't
> be counted
> in the test?
The tests are done with the templates already compiled. I basically ran the
tests twice. They were pretty close anyways, it only gets compiled once.
>
> One more question: what difference would compile_check = false make?
This skips the test Smarty makes to see if the template needs to be
recompiled. It does make a noticable difference, probably a 1-5% speed
increase depending on the situation.
>
> Cheers!
> Peter.
>
> ---oOo---
> sendcard - *The* PHP e-card solution
> http://sendcard.sf.net
> ---oOo---
>