Very cool John, you should forward that to pattemplate and they could see
what to improve.  One thing they could do is just implement caching like
smarty templates does and you can't beat servering up static files.


-----Original Message-----
From: John Holmes [mailto:[EMAIL PROTECTED]]
Sent: June 27, 2002 12:39 AM
To: 'SP'; 'Jean-Christian Imbeault'; [EMAIL PROTECTED]
Subject: RE: [PHP] Seperating presentation from logic


> There are a ton of template systems.  Look here for performance
> benchmarks:
> http://www.phpinsider.com/benchmarks_phemplate
>
> Unfortunately pattemplate isn't tested so I don't know how it rates.

I downloaded the scripts and added patTemplate to the mix. It's average,
rating in the middle on most tests...

The big thing to notice is the last test, which runs through 100 loops
on a test file. Smarty just blows everything out of the water. And think
about what most of your web pages do...loop through result sets.

If anyone wants the files, let me know. It's a simple unzip and run,
everything is all packaged together. Results may vary on different
servers; I'd like to see a *nix/Apache result set posted...

Tested on Win2K / 1Ghz AMD / 512MB RAM / IIS 5.0 / PHP 4.2.1 (ISAPI
Module), YRMV

---John Holmes...

TEST 1.1 :: 20 registered vars :: 10 iterations
name    / total time / average iteration time
100% smarty             4ms 0.0040654
103% phemplate          4ms 0.0041828
147% heyes class                6ms 0.0059759
157% XTemplate          6ms 0.006363
160% phplib tpl                 7ms 0.006502
256% bugi                       10ms 0.0104083
290% patTemplate                12ms 0.0117798
388% vTemplate          16ms 0.0157634
439% TemplatePower v2   18ms 0.0178361
1350% FastTemplate      55ms 0.0548866

TEST 1.2 :: 5 registered vars :: 10 iterations
name / total time / average iteration time
100% heyes class                3ms 0.0032871
106% phemplate          3ms 0.0034916
139% phplib tpl                 5ms 0.0045691
148% smarty             5ms 0.0048685
160% XTemplate          5ms 0.0052609
257% FastTemplate       8ms 0.0084631
307% bugi                       10ms 0.010094
332% patTemplate                11ms 0.0109147
448% TemplatePower v2   15ms 0.0147268
502% vTemplate          16ms 0.0164906

TEST 1.3 :: 40 registered vars :: 5 iterations
name / total time / average iteration time
100% phemplate          2ms 0.00453
141% smarty             3ms 0.0064098
159% XTemplate          4ms 0.0072178
178% phplib tpl                 4ms 0.0080422
206% heyes class                5ms 0.0093244
262% bugi                       6ms 0.0118796
353% TemplatePower v2   8ms 0.015982
368% patTemplate                8ms 0.0166856
401% vTemplate          9ms 0.0181768
1329% FastTemplate      30ms 0.0602032

TEST 2.1 :: text 10kb // loop 100 records // 10 iterations
name / total time / average iteration time
100% smarty             6ms 0.0055744
379% phemplate          21ms 0.0211018
1039% bugi                      58ms 0.0579146
1344% TemplatePower v2  75ms 0.0749261
1360% patTemplate       76ms 0.075819
3283% phplib tpl                183ms 0.1829999
7096% XTemplate                 396ms 0.3955393
8324% heyes class       464ms 0.4640006


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to