Thread (6 messages) flat view 6 messages, 3 authors, 2012-11-12

Re: [PATCH] ipv4: avoid undefined behavior in do_ip_setsockopt()

From: Xi Wang <xi.wang@gmail.com>
Date: 2012-11-11 22:18:58

On 11/11/12 5:02 PM, David Miller wrote:
This code is a fast bit test on purpose.  You're making the
code slower.
No, it's the opposite.  All modern compilers optimize switch cases
into a fast bit test.  The original "smarter" code, however, hinders
the compiler determining the mask for a fast bit test.  With this
patch, GCC is able to compute a better mask.  You can check the
assembly.

- xi
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help