Linus Torvalds <torvalds@transmeta.com> writes:
> Classic mistake. Lookup tables are only faster in benchmarks, they
> are almost always slower in real life. You only need to miss in the
> cache _once_ on the lookup to lose all the time you won on the
> previous one hundred calls.
It seems to me if you call the function so seldom the table drops out
of the cache, it is irrelevant how long it takes anyway.
> "Small and simple" is almost always better than the alternatives.
Well, if a lookup table isn't "small and simple", I don't know what
is.
-- Falk - 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/
This archive was generated by hypermail 2b29 : Wed Apr 30 2003 - 22:00:35 EST