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]
Date:	Mon, 06 Jun 2011 10:08:32 -0700
From:	"H. Peter Anvin" <hpa@...ux.intel.com>
To:	Jean Sacren <sakiwit@...il.com>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] boot: Enhance performance by eliminating unnecessary
 calls to printf()

On 06/05/2011 05:40 PM, Jean Sacren wrote:
> Hi,
> 
> Repeated calling to printf() for 13 times is a dire waste of CPU cycles.
> For performance, combine all those calls into one while source code
> formatting is preserved for readability.
> 
> Compile tested only.
> 
> Signed-off-by: Jean Sacren <sakiwit@...il.com>

You're got to be bloody kidding.

First of all, this is a build time tool which is executed exactly once
during the entire kernel build.

Second, printf execution time is largely dependent on the size
formatting string; since the I/O is buffered it is only issued once
anyway... which basically means that there is no time saved at all.

Third, the resulting code is substantially harder to read.

Fourth, carrying this as a patch will cost kernel developers more time
in additional git execution time than it ever will save them in build time.

Nacked-by: H. Peter Anvin <hpa@...or.com>

	-hpa
--
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