RFR: 8310843: Reimplement ByteArray and ByteArrayLittleEndian with Unsafe

Glavo duke at openjdk.org
Sat Jun 24 09:16:16 UTC 2023


On Sat, 24 Jun 2023 06:42:18 GMT, Glavo <duke at openjdk.org> wrote:

> `ByteArray` and `ByteArrayLittleEndian` are very useful tool classes that can be used in many places to performance tuning.
> 
> Currently they are implemented by `VarHandle`, so using them may have some impact on startup time.
> 
> This PR reimplements them using `Unsafe`, which reduces the impact on startup time.

I removed `getFloatRaw`/`getDoubleRaw` because they are exactly the same as `getFloat`/`getDouble`, so they have no meaning.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14636#issuecomment-1605293964


More information about the core-libs-dev mailing list