cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Dushin <>
Subject HashHappy
Date Tue, 29 Apr 2008 14:16:31 GMT
Is there a reason hashed collections are used, almost exclusively, in  
CXF?  Even in cases where collections are predictably small, Hash(Maps| 
Sets) almost always win out over their sortable cousins in the  
java.util namespace, and this, even when the keys are sortable.

Is there a technical reason for this?  A personal preference?

I've done some performance comparisons between the 2, and for small  
collections, the log(n) lookup doesn't make a difference at all.  So  
for small collections, I'd think CXF might benefit from the relatively  
smaller memory footprint of sortable collections.  We'd also benefit  
from more predictable behavior, as ordering is deterministic, with  
sortable collections.

The same goes for ArrayLists vs LinkedLists, BTW.

Just wondering...


View raw message