commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Maurizio Cucchiara <mcucchi...@apache.org>
Subject Re: svn commit: r1188682 - /commons/proper/ognl/trunk/src/main/java/org/apache/commons/ognl/IntHashMap.java
Date Tue, 25 Oct 2011 16:15:34 GMT
They are legacy constants, they were cabled on code,  I simply
introduced two constants.
I think that the DEFAULT_LOAD_FACTOR is the same stuff defined on the
HashMap, it represents a default threshold of 75%, after that
threshold it should expand the size of the map.
The DEFAULT_INITIAL_CAPACITY is the initial size of the map, there is
no need of primitive, odd, or whatever (though they usually are power
of 2), I think that the original developers found out that 101 was the
right trade-off.
I was thinking to replace the current value with 16 (like the HashMap
value), but I realized that the class is unused since it was replaced
with new cache approach.


Twitter     :http://www.twitter.com/m_cucchiara
G+          :https://plus.google.com/107903711540963855921
Linkedin    :http://www.linkedin.com/in/mauriziocucchiara

Maurizio Cucchiara



On 25 October 2011 17:57, sebb <sebbaz@gmail.com> wrote:
> DEFAULT_LOAD_FACTOR

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Mime
View raw message