Martin Sustrik wrote:

> It's practical O(1), there's no hash table. It's basically an N-ary 
> search tree where first branching corresponds to first character of the 
> topic, second branchings correspond to second character etc. Thus you 
> never get hash conflicts.

Btw, here's the code. It's pretty simple:

http://github.com/sustrik/zeromq2/blob/master/src/prefix_tree.hpp
http://github.com/sustrik/zeromq2/blob/master/src/prefix_tree.cpp

Have a look and give it a thought. If you can make it even faster, let's 
go for it!

Martin
_______________________________________________
zeromq-dev mailing list
zeromq-dev@lists.zeromq.org
http://lists.zeromq.org/mailman/listinfo/zeromq-dev

Reply via email to