On 30 Sep 2009, at 23:28, Robert Poor wrote:
I've written several flavors of hash tables in my life, but I'm not sure how the Stroustrup code sample helps in this case. If you are suggesting that I hack the Chuck source code, you should know that I do entertain such ideas from time to time, but I usually come back to my senses within 25::samp -- it's just not on my list of priorities.
A "written entirely in ChucK" solution -- albeit non-optimal in execution speed -- is good enough for my needs. I'm more into optimizing my days than my milliseconds.
You might combine it with the earlier idea: class ObjectKey { Object object_; int key_; } If using strings as key, you would need to extract the characters. So perhaps use a global int incremented for each instantiation. Then hash with %. Hans