On Thu, 23 Jun 2022 08:53:37 GMT, Daniel Jeliński <djelin...@openjdk.org> wrote:

>> This PR improves the performance of deduplication done by 
>> ResourceBundleGenerator.
>> 
>> The original implementation compared every pair of values, requiring O(n^2) 
>> time. The new implementation uses a HashMap to find duplicates, trading off 
>> some extra memory consumption for O(n) computational complexity. In practice 
>> the time to generate jdk.localedata on my Linux VM files dropped from 14 to 
>> 8 seconds.
>> 
>> The resulting files (under build/support/gensrc/java.base and 
>> jdk.localedata) have different contents; map iteration order depends on the 
>> insertion order, and the insertion order of the new implementation is 
>> different from the original.
>> The files generated before and after this change have the same size.
>
> Daniel Jeliński has updated the pull request incrementally with one 
> additional commit since the last revision:
> 
>   Sort output

LGTM

-------------

Marked as reviewed by rriggs (Reviewer).

PR: https://git.openjdk.org/jdk/pull/9243

Reply via email to