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] [thread-next>] [day] [month] [year] [list]
Message-ID: <20160115155938.GB32346@leon.nu>
Date:	Fri, 15 Jan 2016 17:59:38 +0200
From:	Leon Romanovsky <leon@...n.nu>
To:	SF Markus Elfring <elfring@...rs.sourceforge.net>
Cc:	linux-rdma@...r.kernel.org,
	Devesh Sharma <devesh.sharma@...gotech.com>,
	Doug Ledford <dledford@...hat.com>,
	Hal Rosenstock <hal.rosenstock@...il.com>,
	Mitesh Ahuja <mitesh.ahuja@...gotech.com>,
	Sean Hefty <sean.hefty@...el.com>,
	Selvin Xavier <selvin.xavier@...gotech.com>,
	LKML <linux-kernel@...r.kernel.org>,
	kernel-janitors@...r.kernel.org,
	Julia Lawall <julia.lawall@...6.fr>
Subject: Re: InfiniBand-ocrdma: Delete unnecessary variable initialisations
 in 11 functions

On Fri, Jan 15, 2016 at 04:26:36PM +0100, SF Markus Elfring wrote:
> >> Would you like to clarify any measurable effects around the implementation
> >> detail when various variables will only be initialised immediately
> >> before they will be read again?
> > 
> > Compiler will drop this variable initialization by itself because
> > there are no reads between this variable initialization and write.
> 
> Which compiler variants would you to take into account for such an use case?

GCC supported it before 1999 when I saw it first time. My assumption
that in 2016 all compilers are doing such optimization now.
I would be glad to hear an example of modern compiler which doesn't
support this simple optimization.

> 
> 
> > I recommend you to take a look on the assembly code and ensure it
> > by yourself.
> 
> Will any configuration parameters and command arguments become relevant
> to improve also a corresponding software comparison?

Please suggest us, you are proposing this change, and not me.

> 
> 
> > The proposed change won't affect performance at all.
> 
> Will unneeded variable assignments be really optimised away by default?

Yes

> 
> 
> By the way:
> Will a small source code reduction matter also a bit here?

If you are interested in saving space of one latter, you need to take into
account git database increase, do you?

> 
> Regards,
> Markus

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ