Re: RFR: 8306075: Micro-optimize Enum.hashCode [v5]

2023-04-17 Thread Pavel Rappo
On Mon, 17 Apr 2023 15:55:38 GMT, Aleksey Shipilev wrote: >> olivergillespie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Switch to non-javadoc comment and remove markup > > src/java.base/share/classes/java/lang/Enum.java line 171: >

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v5]

2023-04-17 Thread Aleksey Shipilev
On Mon, 17 Apr 2023 15:54:30 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 with no extra

Re: RFR: 8306075: Micro-optimize Enum.hashCode [v5]

2023-04-17 Thread olivergillespie
> 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 t