* [PATCH] arch: ia64: kernel: smpboot.c: Optimization of the Code
@ 2014-06-01 21:46 Rickard Strandqvist
0 siblings, 0 replies; only message in thread
From: Rickard Strandqvist @ 2014-06-01 21:46 UTC (permalink / raw)
To: Tony Luck, Fenghua Yu
Cc: Rickard Strandqvist, Paul Gortmaker, linux-ia64, linux-kernel
>From what I know, AND is faster then modulo.
Not sure if this is worth changing though.
Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se>
---
arch/ia64/kernel/smpboot.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/arch/ia64/kernel/smpboot.c b/arch/ia64/kernel/smpboot.c
index 547a48d..8d41119 100644
--- a/arch/ia64/kernel/smpboot.c
+++ b/arch/ia64/kernel/smpboot.c
@@ -237,7 +237,7 @@ get_delta (long *rt, long *master)
/* average best_t0 and best_t1 without overflow: */
tcenter = (best_t0/2 + best_t1/2);
- if (best_t0 % 2 + best_t1 % 2 == 2)
+ if ((best_t0 & 1) + (best_t1 & 1) == 2)
++tcenter;
return tcenter - best_tm;
}
--
1.7.10.4
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2014-06-01 21:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-01 21:46 [PATCH] arch: ia64: kernel: smpboot.c: Optimization of the Code Rickard Strandqvist
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).