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

2023-04-17 Thread Aleksey Shipilev
On Mon, 17 Apr 2023 15:41:34 GMT, olivergillespie wrote: >> Yes, it is a bit strange to see @implNote here as this is a private field >> that isn't going to show up in the javadoc. The javadoc for non-transient >> fields in Serializable classes does show up in the Serialized Form page but >> t

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

2023-04-17 Thread olivergillespie
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; in enums with no extra

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

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

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

2023-04-17 Thread Alan Bateman
On Mon, 17 Apr 2023 15:18:12 GMT, Roger Riggs wrote: >>> The @implNote is more appropriate for an internal comment. It is not needed >>> to be in the published javadoc; its only useful to someone viewing the >>> source code. >> >> Is it a comment to me or to the author? If it's the former, the

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

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 15:05:46 GMT, Pavel Rappo wrote: >> The @implNote is more appropriate for an internal comment. It is not needed >> to be in the published javadoc; its only useful to someone viewing the >> source code. > >> The @implNote is more appropriate for an internal comment. It is not

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

2023-04-17 Thread Pavel Rappo
On Mon, 17 Apr 2023 14:56:13 GMT, Roger Riggs wrote: > The @implNote is more appropriate for an internal comment. It is not needed > to be in the published javadoc; its only useful to someone viewing the source > code. Is it a comment to me or to the author? If it's the former, then I note, th

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

2023-04-17 Thread Roger Riggs
On Mon, 17 Apr 2023 14:23:01 GMT, Pavel Rappo wrote: >> olivergillespie has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix two typos > > src/java.base/share/classes/java/lang/Enum.java line 177: > >> 175: * HotSpot's identity hash

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

2023-04-17 Thread Roger Riggs
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; in enums with no extra

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

2023-04-17 Thread Pavel Rappo
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; in enums with no extra

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

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