Smarty Benchmarks

Overview:

The following Smarty benchmarks are executed in real time. Each iteration is fetched through port 80 on the web server, so the benchmark times you see include aspects like server connection, script execution, etc... basically everything a browser would see minus network latency. This method of benchmarking should be a fair depiction of the template engine comparisons. Depending on server traffic, file regeneration, etc. you may see varying results. Many of the engines are extremely close in speed, so try reloading the benchmarks a few times to get a sense of accuracy.

You can grab the sources of these benchmarks here.

How to install: (replace "nobody" with web server user)

gtar -xvf smarty-benchmark.tar.gz
chown nobody:nobody smarty-benchmark/*/*/templates_c/
chown nobody:nobody smarty-benchmark/*/*/cache/

php-accelerator is used on this web server. All of the template engines take advantage of the compilation caching. No server should be without one :-) If you want to view the benchmarks without php-accelerator, prepend /no-cache/ to the URL just after the server name.

I tried my best to setup each template engine efficiently. If you see any problems or a way to do something better, feel free to send me an e-mail: monte at ispi dot net.

Smarty is benchmarked with and without the cache enabled. These examples don't do the caching feature much justice since variable assignment is not coming from an expensive operation, such as a db query. The templates are also not so complex, it doesn't take much longer to parse the template than it does to fetch a cached copy.

ModeliXe is used with its caching feature turned on. I'm not sure how to disable it, but since it is on by default I left it alone.

REAL BENCHMARKS DISABLED due to load on my server, you can still grab the sources and run them locally...