[libc-commits] [PATCH] D82134: Add strcmp.

Chris Gyurgyik via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Jun 18 18:35:58 PDT 2020


cgyurgyik added inline comments.


================
Comment at: libc/src/string/strcmp.cpp:15
+
+int LLVM_LIBC_ENTRYPOINT(strcmp)(const char *l, const char *r) {
+  while (*l) {
----------------
PaulkaToast wrote:
> sivachandra wrote:
> > Is there benefit in comparing words at a time? I know that it leads to potential OOB reads, so we can handle it separately. But if it can lead to speed up, just a leave a TODO about it and we will get to it in a later round.
> I would suggest to opt for more descriptive variable names over single letter one. i.e ("left" instead of "l").
What is the standard for leaving TODOs? I'm not finding anything in the llvm Coding Standards.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D82134





More information about the libc-commits mailing list