lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erik Hatcher <>
Subject Re: DocumentWriter, StopFilter should use HashMap... (patch)
Date Thu, 11 Mar 2004 20:44:15 GMT
I will refactor again using Set with no copying this time (except for 
the String[] and Hashtable) constructors.  This was my original 
preference, but I got caught up in the arguments by Kevin and lost my 
ideals temporarily :)

I expect to do this later tonight or tomorrow.


On Mar 11, 2004, at 12:04 PM, Doug Cutting wrote:

> Erik Hatcher wrote:
>> Yes, I saw it.  But is there a reason not to just expose HashSet 
>> given that it is the data structure that is most efficient?  I bought 
>> into Kevin's arguments that it made sense to just expose HashSet.
> Just the general principal that one shouldn't expose more of the 
> implementation than one must.  I can imagine faster things than a 
> HashSet for this, e.g., a well-coded letter tree (trie) could be a bit 
> faster, since it would only touch each character in the key once.  But 
> it's not a big deal, perhaps not worth fixing at this point.
> I proposed a solution that both respected this concern (yours, as I 
> recall) while at the same time avoiding copying.  It doesn't need to 
> be an either/or situation.  We can easily hide the implementation, 
> avoid copying, and use the most efficient implementation internally.  
> If you no longer care about hiding the implementation, then I guess 
> this is moot.  Before we started this exercise the implementation was 
> exposed, so things have gotten no worse, only better.  But they could 
> have gotten just a little bit better yet!
> Cheers,
> Doug
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message