[libc-commits] [PATCH] D142696: [libc] Check pointer equality in strcmp, strncmp, and memcmp
Dylan Li via Phabricator via libc-commits
libc-commits at lists.llvm.org
Fri Jan 27 21:09:57 PST 2023
squidgyberries added a comment.
#include "include/string.h"
int main(void) {
for (unsigned long i = 0; i < 50000000000; ++i) strcmp("hello", "world");
return 0;
}
I compiled this with clang 15.0.7 on my x64 Arch Linux machine with an Intel i7-12700H without optimizations. I ran it five times with the patch and five time without it and timed it with the `time` command. On average it ran for 12.8618 seconds with the patch and 12.8766 seconds without for me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D142696/new/
https://reviews.llvm.org/D142696
More information about the libc-commits
mailing list