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, 02 Jun 2014 09:24:04 +0200
From:	Clemens Ladisch <clemens@...isch.de>
To:	Rickard Strandqvist <rickard_strandqvist@...ctrumdigital.se>,
	Tony Luck <tony.luck@...el.com>,
	Fenghua Yu <fenghua.yu@...el.com>
CC:	Paul Gortmaker <paul.gortmaker@...driver.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@...el.com>,
	"Srivatsa S. Bhat" <srivatsa.bhat@...ux.vnet.ibm.com>,
	linux-ia64@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] arch: ia64: kernel: palinfo.c:  Optimization of the Code

Rickard Strandqvist wrote:
> From what I know, AND is faster then modulo.

Which is why the compiler does this optimization automatically,
if it can prove that it is correct.

> -		if (i != 0 && (i%64) == 0)
> +		if (i != 0 && (i&63) == 0)

Did you prove that i cannot be negative?


Regards,
Clemens
--
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