Forum OpenACS Development: Re: AOLServer 4.0

Collapse
7: Re: AOLServer 4.0 (response to 6)
Posted by Jeff Davis on
Another benchmark for 4.0 performance. The string commands look a lot faster. I checked a string map version of ad_quotehtml vs. regsubs vs ns_quotehtml and found the following...

timing quoting a 150k html document with 4.0:

 regsub: 127386 microseconds per iteration
 string map: 18477 microseconds per iteration
 ns_quotehtml: 11045 microseconds per iteration
On 3.3+ad13 the results were:
 regsub: 207146 microseconds per iteration
 string map: 93166 microseconds per iteration
 ns_quotehtml: 12933 microseconds per iteration

For a more representative small html fragment, v4.0 gave:

 
 regsub: 3961 microseconds per iteration
 string map: 339 microseconds per iteration
 ns_quotehtml: 189 microseconds per iteration
and 3.3+ad13 gave:
 
 regsub: 5621 microseconds per iteration 
 string map: 1579 microseconds per iteration 
 ns_quotehtml: 180 microseconds per iteration
One thing that impressed me was how close the string map version of ad_quotehtml was to the .c compiled version in ns_quotehtml with tcl8.4.