mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: Jesper Juhl <jesper.juhl@gmail.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	David Howells <dhowells@redhat.com>,
	Andrew Morton <akpm@osdl.org>
Subject: Re: [PATCH] Decrease number of pointer derefs in connection.c
Date: Fri, 09 Dec 2005 10:18:06 +0000	[thread overview]
Message-ID: <22740.1134123486@warthog.cambridge.redhat.com> (raw)
In-Reply-To: <200512082336.36527.jesper.juhl@gmail.com>

Jesper Juhl <jesper.juhl@gmail.com> 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

      reply	other threads:[~2005-12-09 10:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-12-08 22:36 Jesper Juhl
2005-12-09 10:18 ` David Howells [this message]

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=22740.1134123486@warthog.cambridge.redhat.com \
    --to=dhowells@redhat.com \
    --cc=akpm@osdl.org \
    --cc=jesper.juhl@gmail.com \
    --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

Powered by JetHome