https://bz.apache.org/bugzilla/show_bug.cgi?id=58855
Bug ID: 58855
Summary: Don't read through entire string when testing for
emptiness
Product: Apache httpd-2
Version: 2.5-HEAD
Hardware: All
OS: All
Status: NEW
Severity: enhancement
Priority: P2
Component: All
Assignee: [email protected]
Reporter: [email protected]
Created attachment 33440
--> https://bz.apache.org/bugzilla/attachment.cgi?id=33440&action=edit
Patch to optimize empty string checks
strlen unconditionally reads through the entire string, so it's unfortunate to
use it when determining whether a string is empty. Simply dereferencing the
pointer and comparing it with '\0' is simpler and faster. Compilers are
generally bad at making these kinds of optimizations, so it's best to do them
manually.
--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]