linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Jörn Engel" <joern@wohnheim.fh-wedel.de>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: Holden Karau <holden@pigscanfly.ca>,
	Josef Sipek <jsipek@fsl.cs.sunysb.edu>,
	hirofumi@mail.parknet.co.jp, linux-kernel@vger.kernel.org,
	Holden Karau <holdenk@xandros.com>,
	"akpm@osdl.org" <akpm@osdl.org>,
	linux-fsdevel@vger.kernel.org,
	Nick Piggin <nickpiggin@yahoo.com.au>,
	"Matthew Wilcox"@wohnheim.fh-wedel.de
Subject: historical micro-optimizations (Re: [PATCH 1/1] fat: improve sync performance by grouping writes revised again)
Date: Thu, 2 Nov 2006 11:24:27 +0100	[thread overview]
Message-ID: <20061102102427.GA22216@wohnheim.fh-wedel.de> (raw)
In-Reply-To: <454908F9.80905@cfl.rr.com>

On Wed, 1 November 2006 15:52:09 -0500, Phillip Susi wrote:
> 
> In other words, the only time this micro optimization will be of benefit 
> is if you are erroring out most of the time rather than only under 
> exceptional conditions, AND the error label isn't too far away for a 
> conditional branch to reach.  In other words, just don't do it ;)

The difference was in code size, so the icache impact would have
benefitted the good case as well.  "was" and "would have" because I
finally got off my lazy arse and tested the code.  With gcc 4.12 both
variants compiled to exactly the same code.  With 2.95 there was a one
instruction (2 bytes) difference.

I didn't test all the versions in between, but the advantage is
definitely a thing of the past.

And even if the 2 byte difference still existed, it wouldn't really
matter much, we all agree on that.  That's why I said:

> >Both methods definitely work.  Whether one is preferrable over the
> >other is imo 90% taste and maybe 10% better code on some architecture.
> >So just pick what you prefer.

The only thing I was arguing was that one method would not work - it
does.  So I hope this was sufficient distraction for everyone and we
can get back to work. :)

Jörn

-- 
You can't tell where a program is going to spend its time. Bottlenecks
occur in surprising places, so don't try to second guess and put in a
speed hack until you've proven that's where the bottleneck is.
-- Rob Pike
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      parent reply	other threads:[~2006-11-02 10:25 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 16:17 [PATCH 1/1] fat: improve sync performance by grouping writes revised again Holden Karau
2006-11-01 16:47 ` Jörn Engel
2006-11-01 18:02   ` Holden Karau
2006-11-01 20:24     ` Jörn Engel
2006-11-01 20:52       ` Phillip Susi
2006-11-01 22:17         ` Holden Karau
2006-11-02 10:24         ` Jörn Engel [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=20061102102427.GA22216@wohnheim.fh-wedel.de \
    --to=joern@wohnheim.fh-wedel.de \
    --cc="Matthew Wilcox"@wohnheim.fh-wedel.de \
    --cc=akpm@osdl.org \
    --cc=hirofumi@mail.parknet.co.jp \
    --cc=holden@pigscanfly.ca \
    --cc=holdenk@xandros.com \
    --cc=jsipek@fsl.cs.sunysb.edu \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nickpiggin@yahoo.com.au \
    --cc=psusi@cfl.rr.com \
    /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;
as well as URLs for NNTP newsgroup(s).