[threeten-dev] TzdbZonRulesProvider and providerBind
Xueming Shen
xueming.shen at oracle.com
Mon Jan 28 23:54:09 PST 2013
A slim down version of the tzdbProvider.java
http://cr.openjdk.java.net/~sherman/jdk8_threeten/tzdbProvider
-Sherman
On 1/28/2013 10:26 PM, Xueming Shen wrote:
> On 01/28/2013 04:04 PM, Stephen Colebourne wrote:
>>
>>> Here is webrev that
>>> (1) disabled the mechanism (I hope you agree to simply remove it)
>>> (2) replaced the id->index->byte[]/rules lookup to id -> byte[]/rules
>>> (least, we don't have to do binary search )
>> I would have said that the binary search would be faster. It certainly
>> should be smaller in memory than a ConcurrentHashMap.
>> I you have shown it to be faster, then removing the index lookup is OK.
>>
>
> Given it's a 600+ array, I don't think the binary search has
> any chance to win the race:-) except couple hot spots that
> may get hit the first try.
>
> Attached is a non-scientific test case to measure the average
> performance of these two, hashmap is the "new", binary search
> is the "old". The "new" vs "old" is at 1300 : 9000 range.
>
> -Sherman
>
More information about the threeten-dev
mailing list