Tim:

Sorry for delayed reply.  I have been getting ready for travel.  I am currently
in an Airport on my way to Thailand (from Colorado, USA).

> 2.) Doug, have you thought about making a search function that will give 
> up as soon as it determines that there are no matches beginning with 
> Index?  What do you think about including it in one of the upcoming 
> versions?

I think it is very do-able.  The data structure lends itself to that kind of 
"search".  Suggest an API and I will consider it.  (see below, there is a
paper that suggest Judy is a weak performer in this area).

Thanks for your interest

Doug

PS.  My intuition is it may not improve performance, because of caching of the
data.  But, there are people that say "I am out of touch" with modern computers.
They have implemented a "bulk" JudyLNext() and got big improvements.  I have
not had a chance to verify.  There was a paper presented recently that compared
Judy performance with several other methods.  I will look it up, if your interested.
Improving Judy*Next is on my "to do" list.

 
Doug Baskins <dougbaskins@yahoo.com>


From: Tim Margheim <tmargheim@neuric.com>
To: "judy-devel@lists.sourceforge.net" <judy-devel@lists.sourceforge.net>
Sent: Friday, November 16, 2012 4:43 PM
Subject: Prefix-only search?

One of the most frequent operations I need to perform is a prefix
search, i.e. "return the first element that starts with Index, or return
null if nothing does".

I'm currently doing this by calling JudySLNext().  If it returns a
non-null pointer, but the new Index doesn't start with the prefix, I
still return null.

Two questions:
1.) Does anyone know of a more efficient way to do that with the current
set of Judy functions?
2.) Doug, have you thought about making a search function that will give
up as soon as it determines that there are no matches beginning with
Index?  What do you think about including it in one of the upcoming
versions?


---
Tim Margheim
Neuric Technologies, LLC

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Judy-devel mailing list
Judy-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/judy-devel