Yeah, but then this whole discussion is irrelevant too.
I'm just saying that micro-benchmarks of operations that do not make any
sense on their own are _bad_ measures of real performance. That lookup is
going to lose to the "natural" code even if it hits the L2, and misses
only the L1.
Any piece of code that only works well when it sits in (and owns) the L1
is a piece of crap.
> Well, if a lookup table isn't "small and simple", I don't know what
> is.
Something that calculates it directly? Like, perchance, the current code?
There is _never_ any excuse to use a lookup table for something that can
be calculated with a few simple instructions. That's just stupid.
Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/