Richard Salz wrote:
> So now the question is, are there times when you can avoid the memcmp?
> [...] compare some initial bytes. [...]
> only call memcmp if they match.
> [...]

I'd consider an implementation of memcmp that doesn't early stop as soon
as it sees a difference as completely broken, performance wise. Memcmp
returns an ordered comparison but that can be done as soon as the first
bit difference is seen.

You might want to consider an in-line implementation of memcmp to save
the function call time. But seriously this is not what will make a
performance difference. It's a fixed time that is negligible with regard
to other incompressible processing operations required for each reception.




__________________________________________________ ____________________
OpenSSL Project http://www.openssl.org
Development Mailing List openssl-dev@openssl.org
Automated List Manager majordomo@openssl.org