RFR: 8297729: Replace GrowableArray in ComputeMoveOrder with hash table [v3]

Coleen Phillimore coleenp at openjdk.org
Mon Dec 5 17:10:19 UTC 2022


On Mon, 5 Dec 2022 15:41:33 GMT, Jorn Vernee <jvernee at openjdk.org> wrote:

>> Replaces the GrowableArray 'table' in ComputeMoveOrder with a real hash table.
>> 
>> Through testing, I found that sometimes this array is blown up to several thousand elements, most of which are `NULL`. Using a hash table prevents this large wastage.
>> 
>> I've touched up some of the surrounding code as well. Mostly style changes, but I've also removed the `BasicType` field from the `Move` and `MoveOperation` structs, since it was unused, and added frame data storages to the fast path for stack args as well, since both are allocated on the stack.
>> 
>> Testing: `jdk_foreign` test suite.
>
> Jorn Vernee has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains three commits:
> 
>  - Drop redundant friend decl
>  - improve hash slightly
>  - Use hashtable in ComputeMoveOrder + general cleanup

Seems ok.

src/hotspot/share/prims/foreignGlobals.cpp line 200:

> 198:     mtInternal,
> 199:     ComputeMoveOrder::hash,
> 200:     ::operator==

Is this the same as primitive_equals ?

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

Marked as reviewed by coleenp (Reviewer).

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


More information about the hotspot-dev mailing list