"LT" == Leopold Toetsch <[EMAIL PROTECTED]> writes:
LT> I'm currently rewriting the hash implementation in src/hash.c. The LT> new hash structure has just one piece of malloced memory with LT> bucket pointers and buckets in one piece.
here is an odd thought to add to that. since your hash is a single hunk
of ram, you could use offsets inside it instead of pointers. that means
it could be both shareable (given locks) and even writable to disk.
I don't see the difference WRT shareable, but yes, the memory hunk could be written at once for freezing, which may save some cycles. More importantly it doesn't need relocation during hash_expand(), if offsets are calculated from start of mem.
With some benchmarks we can see, which is better, but using offsets seems to be a good idea.
uri
Thanks, leo