From: "David S. Miller" <davem@davemloft.net>
To: jesper.juhl@gmail.com
Cc: linux-kernel@vger.kernel.org, coreteam@netfilter.org,
jmorris@intercode.com.au, laforge@netfilter.org, akpm@osdl.org
Subject: Re: [PATCH] Decrease number of pointer derefs in nfnetlink_queue.c
Date: Thu, 08 Dec 2005 14:51:48 -0800 (PST) [thread overview]
Message-ID: <20051208.145148.36886043.davem@davemloft.net> (raw)
In-Reply-To: <200512082336.01678.jesper.juhl@gmail.com>
From: Jesper Juhl <jesper.juhl@gmail.com>
Date: Thu, 8 Dec 2005 23:36:01 +0100
> Here's a small patch to decrease the number of pointer derefs in
> net/netfilter/nfnetlink_queue.c
>
> Benefits of the patch:
> - Fewer pointer dereferences should make the code slightly faster.
> - Size of generated code is smaller
> - improved readability
And you verified the compiler isn't making these transformations
already? It should be doing so via Common Subexpression Elimination
unless the derefs are scattered around with interspersed function
calls in which case the compiler cannot prove that the memory
behind the pointer does not change.
next prev parent reply other threads:[~2005-12-08 22:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-08 22:36 Jesper Juhl
2005-12-08 22:51 ` David S. Miller [this message]
2005-12-08 23:10 ` Jesper Juhl
2005-12-08 23:56 ` Steven Rostedt
2005-12-09 0:08 ` Jeff Garzik
2005-12-09 5:04 ` Harald Welte
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20051208.145148.36886043.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=akpm@osdl.org \
--cc=coreteam@netfilter.org \
--cc=jesper.juhl@gmail.com \
--cc=jmorris@intercode.com.au \
--cc=laforge@netfilter.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®