PHP Template Engine Comparison

speed matter ... sometimes ...


A blogger asked me "Do you know any professional benchmarks for templates?" So I made this one. Now, this project is getting the attention of the international PHP developers community, which is divided in two. One says PHP itself is the best template engine, the other says PHP needs template engines. With these benchmark & charts you can compare the performances of template engines vs PHP templates, and make your choice.


This benchmark is performed by executing an assignment and a loop test. Each template engine is executed 10 times foreach single test. The test is executed on compiled template with cache disabled. The charts shows the average execution time and memory consumed for each test. Have fun.

Cross Origin Resource Sharing



click here to download this benchmark



                            

Execution Time (loop)

Memory (loop)

Total average (loop)

Summary (loop)

Test tot. time tot. memory package size
php - 903 �s 11.21 KB 4 KB
raintpl 2.6.2 3111 �s 128.3 KB 37 KB
savant 1.42 3449 �s 128.38 KB 209 KB
dwoo 1.1.0 8129 �s 402.12 KB 848 KB
twig 1.0.0-RC2 8269 �s 397.68 KB 647 KB
smarty 3.0.5 9321 �s 466.49 KB 971 KB
Share it if you like it!