From: Eric Dumazet Date: Sat, 25 Mar 2006 11:08:19 +0000 (-0800) Subject: [PATCH] Use unsigned int types for a faster bsearch X-Git-Tag: v2.6.17-rc1~754 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d74beb9f33a5f16d2965f11b275e401f225c949d;p=pandora-kernel.git [PATCH] Use unsigned int types for a faster bsearch This patch avoids arithmetic on 'signed' types that are slower than 'unsigned'. This saves space and cpu cycles. size of kernel/sys.o before the patch (gcc-3.4.5) text data bss dec hex filename 10924 252 4 11180 2bac kernel/sys.o size of kernel/sys.o after the patch text data bss dec hex filename 10903 252 4 11159 2b97 kernel/sys.o I noticed that gcc-4.1.0 (from Fedora Core 5) even uses idiv instruction for (a+b)/2 if a and b are signed. Signed-off-by: Eric Dumazet Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed