Hi list,
> > I will supply all the information you want. However, at first let me > try to be brief and start with some background. > Thanks Doug. Can I help on the coding part also ? I hate using libraries without a full understanding of their mechanics. > Since its first public release in year 2002, I have done perhaps ten > thousand of measurements on Judy's performance. I almost always come to > the same conclusion: To quote a Judy team member (Bob Gobeille) back in > 2000 -- "It's all about cache-line fills stupid". This is far more true > in modern processors (C2D) than it was in 2000. > Yes, "all about cache-line ..." ;-) I'm not an expert in "cache oblivious data-structure and algorithms", but I get used to it. I'll learn if you're patient with me ;-) Here 's what I'd like to have about the interfaces. Following the doc, we've only 4 types of Judy's classes: Judy1 <http://judy.sourceforge.net/doc/Judy1_3x.htm> - maps an *Index* (word) to a *bit* JudyL <http://judy.sourceforge.net/doc/JudyL_3x.htm> - maps an *Index* (word) to a *Value* (word/pointer) JudySL <http://judy.sourceforge.net/doc/JudySL_3x.htm> - maps an *Index* (null terminated string) to a *Value *JudyHS <http://judy.sourceforge.net/doc/JudyHS_3x.htm> - maps an *Index* (array-of-bytes) of *Length* to a *Value* Let make uniq the interface for all of them. 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip /* judy.h */ enum {JUDY_1 = 1, JUDY_L, JUDY_SL, JUDY_HS}; extern const void * Judy; /* note that this data structure is hidden ;-) */ /* main.c */ * *#include <judy.h> void * jsl = bless (Judy, JUDY_SL); /* bless is a variadic function */ void * jl = bless (Judy, JUDY_L, PARAM_X, PARAM_Y); ... do what you want ... destroy (jl); destroy (jsl); /* note that destroy is polymorphic ("bless" also) */ 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip 8< snip With this simple interface, we hide all the implementation of Judy in "judy.h". Future versions of Judy will benefit from that. The developper will never touch to their code even after an upgrade. The Judy implementation can change again and again till it reaches the "nirvana" ;-) An important point is abut "Judy" types. There's no other special type but "void *". The only safe portable type in any platform. Anything else is hidden behind the "extern const void * Judy" which is defined elsewhere. I can provide the code for this if you want ;-) Comments and "critics" are welcome. cheers Younès ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Judy-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/judy-devel
