httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 50920] using word wise comparison to improve string comparison
Date Sun, 13 Mar 2011 05:58:53 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=50920

--- Comment #2 from Linhai Song <songlinhai0543@gmail.com> 2011-03-13 00:58:50 EST ---
No optimizing compiler is able to perform this type of optimization. We need to
write word-wise comparison codes by ourselves. 

I may make some misleading claims in my original bug report.
Actually, based on my unit testing, the suggested implementation almost always
runs faster.
When the length is smaller than 4 bytes, there is negligible performance
difference.
When the length is larger than 4 bytes, the version I suggested runs 
much faster.
For example, when the trailing blank length is 10 bytes, the version I
suggested only takes about 3/4 the time the original version takes. And when
the trailing blank length is 20, the version I suggested only takes about HALF
the time the original version takes.

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message