lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Thu, 2 Nov 2006 11:24:27 +0100
From:	Jörn Engel <joern@...nheim.fh-wedel.de>
To:	Phillip Susi <psusi@....rr.com>
Cc:	Holden Karau <holden@...scanfly.ca>,
	Josef Sipek <jsipek@....cs.sunysb.edu>,
	hirofumi@...l.parknet.co.jp, linux-kernel@...r.kernel.org,
	Holden Karau <holdenk@...dros.com>,
	"akpm@...l.org" <akpm@...l.org>, linux-fsdevel@...r.kernel.org,
	Nick Piggin <nickpiggin@...oo.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)

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-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ