Most Efficient Way to Map Generic Input To Generic Output
From an asymptotic perspective: No, there's no more efficient mapping than just using a table.  Lookup in a table is $O(1)$, and you can't beat $O(1)$.

From a practical perspective: The answer will depend upon the exact application domain.  For instance, sometimes using a cache will speed up things (by only a constant factor, but in practice constant factors can help), if the access pattern exhibits some locality.  It's impossible to give a general answer without knowing the specifics of the particular way you plan to use the lookup table.

However, no, you shouldn't expect there to be some clever number theory trick to build a faster lookup table.  Roughly speaking, a lookup table is as fast as you can get; all that remains is some practical optimizations.



Memory efficiency is a different matter, and depends upon the function f.  Sometimes it can be faster to compute f(x) from scratch than to look up x in the table.  Sometimes, if you've previously computed f(x') and if x' is "close" to x, then you can efficiently compute f(x).  It all depends on the function.