[libc-commits] [PATCH] D152507: Directly return 0 in memcmp/bcmp when input pointers point to same memory location

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Jun 9 02:25:34 PDT 2023


gchatelet added a comment.

Hi @xiongji90 !
We explicitly don't handle this use case because it is in the critical path and we care more about latency in general than rarely occurring calls.
If `p1 == p2` is expected to occur it should be handled on the client side.

Thx for the patch though.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D152507/new/

https://reviews.llvm.org/D152507



More information about the libc-commits mailing list