Reading recently about different tests, i decided to see how we stand
with PHP or Ruby.
The results are somewhat bad, Naviserver is 2x slower on simple adp page
comparing to similar PHP page.
Below are files:
test.php
-------------------------------
<BODY>
Test list <?php print date; ?><P>
<UL>
<?php
for ($i = 0; $i < 50; $i++) {
print $i;
}
?>
</UL>
</BODY>
test.adp
------------------------------------
<BODY>
Test list <%=[ns_fmttime [ns_time]]%><P>
<UL>
<%
for { set i 0 } { $i < 50 } { incr i } {
ns_adp_puts $i
}
%>
</UL>
</BODY>
The commands i used:
ab -c 10 -n 1000 http://localhost/test/test.adp
ab -c 10 -n 1000 http://localhost:8080/test.php
Machine is 3.2Ghx Xeon(Hyperthreading enabled) with 1Gb of RAM
PHP Requests per second: 3281.09 [#/sec] (mean)
NS Requests per second: 1762.10 [#/sec] (mean)
Converting .adp into.tcl did not help, still same speed. I've never
benchmarked NS before, but now i am surprised. I know Tcl is slow but
that is at least 2 times. By making list bigger as 500 iterations, PHP
works still faster than Tcl does 50 iterations.
--
Vlad Seryakov
571 262-8608 office
[EMAIL PROTECTED]
http://www.crystalballinc.com/vlad/