From: svspir (Shannon Spires)

Subject: Re: large size hash-tables and CPU time

Date: 2002-12-5 19:25

> We noticed (with profiler) that, with a fixed hash-table size, much > effort is spent on (re-)hashing. So, we tried to declare the size of > the hashtable as some function of the input parameters. We use the > following rehash arguments :rehash-threshold 0.9 :rehash-size 1.5. > > When we run our experiments, the CPU time performance (measured with > the function time, w/o accounting for the effort spent on gc) is very > erratic: sometimes the fixed size hash-table shows a better > performance sometimes the opposite is true...
Are you using eq hash tables? Typically, eq hash tables have to be rehashed whenever the gc runs. This may also be true on eql hash tables depending on what they actually contain as keys. In addition, hash table traversal with maphash and looping on hashtables may require locking or copying the whole table. Probably best to avoid these if you're trying to get reproducible timings. I don't know anything about the specifics of ACL's hash tables, but these are a couple of issues I've run into with various CL implementations. -- Shannon Spires <sandia.gov at svspire>