develooper Front page | perl.perl6.internals | Postings from May 2005

Re: wanted: hash stress tests

Thread Previous | Thread Next
From:
Uri Guttman
Date:
May 20, 2005 09:48
Subject:
Re: wanted: hash stress tests
Message ID:
x7sm0hq1wj.fsf@mail.sysarch.com
>>>>> "LT" == Leopold Toetsch <lt@toetsch.at> 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  ------  uri@stemsystems.com  -------- http://www.stemsystems.com
--Perl Consulting, Stem Development, Systems Architecture, Design and Coding-
Search or Offer Perl Jobs  ----------------------------  http://jobs.perl.org

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About