PS about locking inside Judy arrays.  Late in the project we did
consider thread issues, which is why we spent time studying the matter
and writing the text/example program.  Since Judy is a digital tree,
certainly it's theoretically possible to add locking info to tree nodes
and lock/synchronize subtrees.

But performance is a funny business.  Judy is highly tuned for
speed/space performance while remaining as portable as possible.
(Unfortunately we learned too late about knowing only dependent
attributes, such as endianness, not platform types, but that's another
story.)  The time required to thread lock swamps average Judy operation
times, if I recall right.  The space required to add thread locking
would swamp Judy's low average bytes per index.  You'd give back most of
what it buys you!

So if at all possible, avoid the need to thread-sync, and if you must,
try doing it at the whole-array level first.

Bear in mind that one unobvious feature Judy buys you is huge but
efficient meta-tries, that is, where every node is itself a Judy array
handling one word (32 or 64 bits) of a longer key value.  That's how
JudySL works.  Nothing prevents you from thread locking whole arrays in
the meta-trie, and pretending each Judy array is an atomic object.

Alan

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Judy-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/judy-devel

Reply via email to