Re: [PATCH] arch: sparc: kernel: smp_64.c: Optimization of the Code

From: David Miller
Date: Sun Jun 01 2014 - 21:52:54 EST


From: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>
Date: Sun, 1 Jun 2014 23:48:18 +0200

> From what I know, AND is faster then modulo.
> Not sure if this is worth changing though.
>
> Signed-off-by: Rickard Strandqvist <rickard_strandqvist@xxxxxxxxxxxxxxxxxx>

This code came from the IA-64 arch code, so you probably want to
fix either both or neither.

I'd say neither, this is not a performance critical path and the
intent is clearer when expressed as a modulus.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/