>>>>> "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. but
that doesn't handle the issues with serializing the scalar values (and
even keys) but it does make those things easier. and yes i know there is
a core serializer but if you make the hash pointers inside that ram
chunk into offsets instead, that will speed up serializing hashes.

PL/I has a thing called AREA where you could declare one and allocate
anything from it. but all the pointers you got back were offsets from
the base of that area. it was meant just for the ability to create
binary structures in ram that could be written/read to disk and back.

just reminiscing,

uri

-- 
Uri Guttman  ------  [EMAIL PROTECTED]  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Reply via email to