RFR: JDK-8310502 : Optimization for j.l.Long.fastUUID() [v22]
Glavo
duke at openjdk.org
Mon Jun 26 15:01:19 UTC 2023
On Mon, 26 Jun 2023 14:40:08 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> The implementation should do its best whether or not CompactStrings is true or false. (Until the time it is deprecated and remove). Throwing an internal error is not an option.
I understand that we must provide a working implementation for it, but do we really need to do our best to optimize for it?
Take this PR as an example. By using `newStringNoRepl`, it has the best performance when `COMPACT_STRINGS` is `true` and can also work when `COMPACT_STRINGS` is `false`.
But if we want the best performance in both cases, then we will have to create another method to carefully optimize for situations where `COMPACT_STRINGS` is `false`.
What I want to know is whether it is necessary for us to do so? Or do we only need to focus on optimizing situations where `COMPACT_STRINGS` is `true`, while other situations do not require careful optimization?
-------------
PR Comment: https://git.openjdk.org/jdk/pull/14578#issuecomment-1607664719
More information about the core-libs-dev
mailing list