Re: [PATCH] Replace strcmp_icase with strequal_icase
- From
Duy Nguyen <pclouds@gmail.com>
- Date
- Mar 9, 2013, 10:40 UTC
- Message-ID
- <CACsJy8CphBDKsAAKjCoze98jv=4U+3pN3cW1OYD5XNhYgfcVCA@mail.gmail.com>
- In-Reply-To
- <1362818574-16873-1-git-send-email-iveqy@iveqy.com>
On Sat, Mar 9, 2013 at 3:42 PM, Fredrik Gustafsson <iveqy@iveqy.com> wrote:
> To improve performance.
BTW, by rolling our own string comparison, we may lose certain optimizations done by C library. In case of glibc, it may choose to run an sse4.2 version where 16 bytes are compared at a time. Maybe we encounter "string not equal" much often than "string equal" and such an optimization is unncessary, I don't know. Measured numbers say it's unncessary as my cpu supports sse4.2.
-- Duy