0

I want a key value data structure which can support concurrent read operations by multiple threads in C support for 1M key values. I suppose Judy array is good both in terms of memory consumption & speed.

How does it stand in comparison to standard hash implementations by RCU or Google densehash? Can I use single Judy array instance across Multiple threads? in JUDYSL the value type is only uint can I store an instance of struct/object & how?

Ajay Bodhe
  • 51
  • 1
  • 11

1 Answers1

1

The JudyArray implementation at code.google.com/p/judyarray supports multiple simultaneous readers in different threads. Each thread needs to call judy_clone on the base judyarray to obtain its own array stack.

I don't know about the source forge version.

Malbrain
  • 83
  • 7
  • But that will increase the memory requirement & why it has to be cloned to be used by different thread? Not thread safe? Or does it perform any internal pointer updates to maintain states? – Ajay Bodhe Jul 21 '14 at 09:06
  • The entire array isn't cloned, just the path stack to the current judy element is created for use by another thread. – Malbrain Jul 31 '14 at 19:34