I am considering Smarty as my web app templating solution, and I am now concerned with its performance against plain PHP.

The Smarty site says it should be the same, however, I was not able to find anyone doing real benchmarking to prove the statement right or wrong.

Did anyone do some benchmarking of Smarty vs plain PHP? Or maybe come across some resources on such tests?



I might be wrong, but Smarty is 'Plain Php' it is just a templating engine written in php. It seems unlikely that you would be able to write a templating engine that is faster than smarty

Written by andrew

Accepted Answer

Because in the end, Smarty compiles and caches the templates files to native PHP-code, there is indeed no theoretical performance difference. Of course there will always be some performance loss due to the chunk of Smarty-code that needs to be interpreted every time.

Written by Javache
This page was build to provide you fast access to the question and the direct accepted answer.
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki