On Tue, 4 Mar 2003, Josh Chamas wrote:
I thought it was interesting that Embperl 2 (barely) beat out PHP 4.3.0 on XSLT in both the XSLT Hello & XSLT Big tests.
Why is that interesting? A bit more background would be interesting. :-) (post it to the list maybe).
My experience has been that raw mod_perl handlers, PHP scripts & Resin JSP tend to be the fastest on the benchmarks generally ( aside from the pure C handlers of course! ) ... so when Embperl2 beats out PHP on the XSLT tests, I was a bit surprised, especially since both of the benchmarks are using libxslt ( http://xmlsoft.org/XSLT/ ).
Neither environment seems to have a XSLT specific caching mechanism, so I would have guessed that PHP would beat out Embperl2. Gerald must have done a fine job on the Embperl XSLT implementation to beat out PHP here.
Perhaps its due to that PHP does not really integrate XSLT other than some additional API calls. The script itself is causing the XSLT rendering to happen:
<?php $xmldoc = domxml_open_file('hxslt.xml'); $xsldoc = domxml_xslt_stylesheet_file('hello.xsl'); $result = $xsldoc->process($xmldoc); echo $xsldoc->result_dump_mem($result); ?>
This differs from Embperl where the application layer itself handles the XSLT rending, not the script/XML file:
PerlSetEnv EMBPERL_RECIPE LibXSLT PerlSetEnv EMBPERL_XSLTPROC libxslt PerlSetEnv EMBPERL_XSLTSTYLESHEET $ROOT/hello.xsl
So perhaps Embperl 2 is able to do some things like caching of style sheets and the like internally that PHP doesn't do for one?
Regards,
Josh
________________________________________________________________ Josh Chamas, Founder phone:925-552-0128 Chamas Enterprises Inc. http://www.chamas.com NodeWorks Link Checking http://www.nodeworks.com