On Mon, 17 Apr 2023 10:59:34 GMT, olivergillespie wrote:
> Improve the speed of Enum.hashCode by caching the identity hashcode on first
> use. I've seen an application where Enum.hashCode is a hot path, and this is
> fairly simple speedup. The memory overhead is low; in enums
On Mon, 17 Apr 2023 16:42:38 GMT, olivergillespie wrote:
>> Improve the speed of Enum.hashCode by caching the identity hashcode on first
>> use. I've seen an application where Enum.hashCode is a hot path, and this is
>> fairly simple speedup. The memory overhead is low;
on in the [original enhancement
> request](https://bugs.openjdk.org/browse/JDK-8306075). [Benchmark results and
> generated code analysis moved to comment]
>
> Thanks @shipilev for help with the implementation and interpreting the
> generated code.
olivergillespie has updated t
On Mon, 17 Apr 2023 14:15:39 GMT, olivergillespie wrote:
>> Improve the speed of Enum.hashCode by caching the identity hashcode on first
>> use. I've seen an application where Enum.hashCode is a hot path, and this is
>> fairly simple speedup. The memory overhead is low;
on in the [original enhancement
> request](https://bugs.openjdk.org/browse/JDK-8306075). [Benchmark results and
> generated code analysis moved to comment]
>
> Thanks @shipilev for help with the implementation and interpreting the
> generated code.
olivergillespie has updated t
On Mon, 17 Apr 2023 15:30:52 GMT, Alan Bateman wrote:
>> I would change this to be an non-javadoc comment. (Change /** to /*)
>> An there is no need for javadoc \implNote or @link javadoc markup.
>> There is very little value in being able to generate javadoc for --private.
>> (In part because m
0x10(%r12,%r10,8),%r8d <-- read the hash
> field
> │ 0x7f550068e3b9: test %r8d,%r8d <-- if (hash == 0)
> │ 0x7f550068e3bc: je 0x7f550068e413 <-- slow init path,
> only taken on first use
>
>
> Thanks @shipilev for h
On Mon, 17 Apr 2023 13:26:49 GMT, Claes Redestad wrote:
> Why isn't `Enum::hashCode` simply doing `return ordinal;`?
See https://bugs.openjdk.org/browse/JDK-8050217
-
PR Comment: https://git.openjdk.org/jdk/pull/13491#issuecomment-1511350037
On Mon, 17 Apr 2023 13:27:43 GMT, olivergillespie wrote:
>> Improve the speed of Enum.hashCode by caching the identity hashcode on first
>> use. I've seen an application where Enum.hashCode is a hot path, and this is
>> fairly simple speedup. The memory overhead is low;
0x10(%r12,%r10,8),%r8d <-- read the hash
> field
> │ 0x7f550068e3b9: test %r8d,%r8d <-- if (hash == 0)
> │ 0x7f550068e3bc: je 0x7f550068e413 <-- slow init path,
> only taken on first use
>
>
> Thanks @shipilev for he
0x10(%r12,%r10,8),%r8d <-- read the hash
> field
> │ 0x7f550068e3b9: test %r8d,%r8d <-- if (hash == 0)
> │ 0x7f550068e3bc: je 0x7f550068e413 <-- slow init path,
> only taken on first use
>
>
> Thanks @sh
Improve the speed of Enum.hashCode by caching the identity hashcode on first
use. I've seen an application where Enum.hashCode is a hot path, and this is
fairly simple speedup. The memory overhead is low; in enums with no extra
fields there is already a 4-byte space due to alignment so this new
12 matches
Mail list logo