[SMARTY] yet another benchmark
| From: | Brian E . Lozier | Date: | Mon, 10 Jun 2002 20:57:46 +0000 |
| Subject: | [SMARTY] yet another benchmark | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4746@lists.php.net to get a copy of this message | ||
I loaded the benchmark on my local FreeBSD development machine and I posted the results online
(they're not in
real time). I ran them about 10 times each and the template systems never "changed
places" between running,
although the milliseconds did vary a tiny bit (never more than 3 or 4). The important difference
between these
and the ones on the smarty site is that mine DO NOT have anything like php-accelerator installed, so
it's a
vanilla php/apache module (the typical set up, I think).
Monte: Yes, these are more fair and I'm pleased with the results. I'm glad the include()s
now happen and get
calculated to the results. These benchmarks don't really show anything different than the
original benchmarks
here: http://www.phpinsider.com/benchmarks/
Smarty is fastest with an accel since the large class doesn't have to be interpreted each time.
Under maximum
iterations, the speed of smarty shows because you're executing native PHP code, whereas with
the rest, you're
executing something like a regular expression or str_replace() on each and every iteration. For
non-accel
machines, it takes quite a while to make up the difference (parsing a large class and executing
native code vs
parsing a small class and calling a func or regex each iteration).
Now, obviously none of these take into account the REST of the features the various templating
systems offer (or
don't offer). On this, I think we can all agree that smarty is by far at the top of the list
feature-wise (and
will likely stay that way thanks to the plugins).
Brian