RFR: 8330465: Stable Values and Collections (Internal) [v5]
Per Minborg
pminborg at openjdk.org
Thu May 16 12:06:08 UTC 2024
On Thu, 16 May 2024 11:14:16 GMT, Chen Liang <liach at openjdk.org> wrote:
>> The idea here is to have the most likely value in the middle... Not sure if that motivates the added complexity though.
>
> Is there any refernce on how/why the middle entry in a tableswitch instruction is the fastest?
It is only in a _lookupswitch_ that this becomes relevant. The above code will generate a *tableswitch* so I think it is safe to simplify the code and remove the DUMMY.
private V orThrowVolatile();
descriptor: ()Ljava/lang/Object;
flags: (0x0002) ACC_PRIVATE
Code:
stack=1, locals=1, args_size=1
0: aload_0
1: invokevirtual #15 // Method stateVolatile:()I
4: tableswitch { // 0 to 4
0: 40
1: 44
2: 46
3: 51
4: 56
default: 60
}
...
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/18794#discussion_r1603214742
More information about the hotspot-compiler-dev
mailing list