Po zadnjim rezultatima Smarty 2 je dva do tri puta brzi.
Test (mysql tabela, php fajl, template, smart 2 i smarty3, rezultati) se moze skinuti sa:
http://rapidshare.com/files/30140859...arty3.rar.html
TESTNO OKRUŽENJE
WinXP SP2
PHP Version 5.2.3 with eAccelerator v0.9.5.1
Mysql Server version: 5.0.45-community-nt-log (Client API version 5.0.37)
Apache/2.2.4 (Win32)
SMARTY 2
nekompajliran template:
1. ucitavanje: 11.0 ms
2. ucitavanje: 10.2 ms
3. ucitavanje: 11.0 ms
4. ucitavanje: 12.0 ms
5. ucitavanje: 11.0 ms
min: 10.2 ms
max: 12.0 ms
Rezultati mjereni sa Xdebugom. compile_check i force_complie setovani na 'true'.
kompajliran template:
1. ucitavanje: 5.1 ms
2. ucitavanje: 5.0 ms
3. ucitavanje: 5.0 ms
4. ucitavanje: 5.2 ms
5. ucitavanje: 4.9 ms
min: 4.9 ms
max: 5.2 ms
Rezultati mjereni sa Xdebugom. compile_check i force_complie setovani na 'false'.
AB (kompajliran template)
ab -n 1000 -c 100
1. time taken for test: 34.25 sec
2. time taken for test: 29.43 sec
3. time taken for test: 31.28 sec
Rezultati mjereni sa Apache benchom (AB). compile_check i force_complie setovani na 'false'.
SMARTY 3
nekompajliran template:
1. ucitavanje: 42.0 ms
2. ucitavanje: 60.0 ms
3. ucitavanje: 42.0 ms
4. ucitavanje: 60.0 ms
5. ucitavanje: 56.0 ms
min: 42.0 ms
max: 56.0 ms
Rezultati mjereni sa Xdebugom. compile_check i force_complie setovani na 'true'.
kompajliran template:
1. ucitavanje: 7.8 ms
2. ucitavanje: 9.2 ms
3. ucitavanje: 9.3 ms
4. ucitavanje: 9.1 ms
5. ucitavanje: 9.2 ms
min: 7.8 ms
max: 9.3 ms
Rezultati mjereni sa Xdebugom. compile_check i force_complie setovani na 'false'.
AB (kompajliran template)
ab -n 1000 -c 100
1. time taken for test: 87.75 sec
2. time taken for test: 83.96 sec
3. time taken for test: 86.43 sec
Rezultati mjereni sa Apache benchom (AB). compile_check i force_complie setovani na 'false'.
Sum of calls (podatak u Xdebugu) je 621 za Smarty2, a za Smarty 3 je 1394.
Nije relevantan podatak glede brzine, ali ipak ...