Re: [PATCH] Decrease number of pointer derefs in connection.c

From: David Howells
Date: Fri Dec 09 2005 - 05:20:47 EST


Jesper Juhl <jesper.juhl@xxxxxxxxx> wrote:

> Benefits of the patch:
> - Fewer pointer dereferences should make the code slightly faster.
> - Size of generated code is smaller
> - improved readability

I'm a little surprised that it makes it faster or smaller: I'd've thought that
the gcc optimiser would be up to caching the pointer; in fact, if it made any
difference, I'd've thought it'd make it larger, slower and consume more stack
space as the compiler would then have to carry the extra variable around.

OTOH, compiler's are black magic, possibly even blacker than kernels, so who
knows...

David
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/