Re: RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum [v2]

2024-07-12 Thread duke
On Wed, 10 Jul 2024 22:02:12 GMT, Shaojin Wen wrote: >> The current HexFormat defines an Enum to represent LowerCase and UpperCase >> >> >> class HexFormat { >> private enum Case { >> LOWERCASE, >> UPPERCASE >> } >> } >> >> >> This will cause the JVM to load one more c

Re: RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum [v2]

2024-07-10 Thread Chen Liang
On Wed, 10 Jul 2024 22:02:12 GMT, Shaojin Wen wrote: >> The current HexFormat defines an Enum to represent LowerCase and UpperCase >> >> >> class HexFormat { >> private enum Case { >> LOWERCASE, >> UPPERCASE >> } >> } >> >> >> This will cause the JVM to load one more c

Re: RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum [v2]

2024-07-10 Thread Shaojin Wen
On Wed, 10 Jul 2024 13:01:21 GMT, Chen Liang wrote: > The internal enum representation is an unnecessary abstraction; a boolean for > uppercase is used for all public endpoints in `isUpperCase` and `toString`, > so using the same boolean internally makes sense. > > Do you think we should call

Re: RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum [v2]

2024-07-10 Thread Shaojin Wen
> The current HexFormat defines an Enum to represent LowerCase and UpperCase > > > class HexFormat { > private enum Case { > LOWERCASE, > UPPERCASE > } > } > > > This will cause the JVM to load one more class when it starts, which can be > seen as follows > > > public

Re: RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum

2024-07-10 Thread Chen Liang
On Fri, 5 Jul 2024 23:06:17 GMT, Shaojin Wen wrote: > The current HexFormat defines an Enum to represent LowerCase and UpperCase > > > class HexFormat { > private enum Case { > LOWERCASE, > UPPERCASE > } > } > > > This will cause the JVM to load one more class when it

RFR: 8335802: Improve startup speed HexFormat uses boolean instead of enum

2024-07-05 Thread Shaojin Wen
The current HexFormat defines an Enum to represent LowerCase and UpperCase class HexFormat { private enum Case { LOWERCASE, UPPERCASE } } This will cause the JVM to load one more class when it starts, which can be seen as follows public class Startup { public stat