Files
kernel_google_b1c1/include/linux/string.h
Sultan Alsawaf 3c155937e3 string: Use faster alternatives when constant arguments are used
When strcpy, strcat, and strcmp are used with a literal string, they can
be optimized to memcpy or memcmp calls. These alternatives are faster
since knowing the length of a string argument beforehand allows
traversal through the string word at a time without being concerned
about looking for the terminating zero character. In some cases, the
replaced calls to memcpy or memcmp can even be optimized out completely
for a significant speed up.

Signed-off-by: Sultan Alsawaf <sultan@kerneltoast.com>
2024-08-13 23:01:44 +05:30

14 KiB