summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2016-10-11 13:51:30 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-11 15:06:30 -0700
commit1204c77f9b6ab8ba8cc6cfe00342f5e64a740cdf (patch)
tree7c48ad22c756dc7b6215ac5aca362bc192efd35a /lib
parentbf90e56e467ed5766722972d483e6711889ed1b0 (diff)
downloadlinux-rpi3-1204c77f9b6ab8ba8cc6cfe00342f5e64a740cdf.tar.gz
linux-rpi3-1204c77f9b6ab8ba8cc6cfe00342f5e64a740cdf.tar.bz2
linux-rpi3-1204c77f9b6ab8ba8cc6cfe00342f5e64a740cdf.zip
include/linux/ctype.h: make isdigit() table lookupless
Make isdigit into a simple range checking inline function: return '0' <= c && c <= '9'; This code is 1 branch, not 2 because any reasonable compiler can optimize this code into SUB+CMP, so the code while (isdigit((c = *s++))) ... remains 1 branch per iteration HOWEVER it suddenly doesn't do table lookup priming cacheline nobody cares about. Link: http://lkml.kernel.org/r/20160826190047.GA12536@p183.telecom.by Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions