Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Smarty benchmark, anyone?

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?

Thanks

like image 673
gnosis Avatar asked Dec 13 '08 08:12

gnosis


3 Answers

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.

like image 125
Javache Avatar answered Nov 01 '22 01:11

Javache


You might also want to take at a new template library that is similar to Smarty called Dwoo

like image 4
ejunker Avatar answered Oct 31 '22 23:10

ejunker


Just found this very simple benchmark - propably not very significant.

like image 3
Patryk Kordylewski Avatar answered Nov 01 '22 01:11

Patryk Kordylewski