Before using R, I used quite a bit of Perl. In Perl, I would often use hashes, and lookups of hashes are generally regarded as fast in Perl.
For example, the followi
You could try environments and/or the hash package by Christopher Brown (which happens to use environments under the hood).