On Wed, 4 Jan 2023 08:48:56 GMT, Per Minborg <pminb...@openjdk.org> wrote:

> Currently, `java.io.Bits` is using explicit logic to read/write various 
> primitive types to/from byte arrays. Switching to the use of `VarHandle` 
> access would provide better performance and less code. 
> 
> Also, using a standard API for these conversions means future `VarHandle` 
> improvements will benefit `Bits` too. 
> 
> Improvements in `Bits` will propagate to `ObjectInputStream`, 
> `ObjectOutputStream` and `RandomAccessFile`.
> 
> Initial benchmarks and performance discussions can be found here: 
> https://github.com/openjdk/panama-foreign/pull/762

This pull request has now been integrated.

Changeset: 3462438a
Author:    Per Minborg <pminb...@openjdk.org>
URL:       
https://git.openjdk.org/jdk/commit/3462438ae1bc469243096abeb5adbe007ef14fe5
Stats:     467 lines in 3 files changed: 428 ins; 24 del; 15 mod

8299576: Reimplement java.io.Bits using VarHandle access

Reviewed-by: uschindler, alanb

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

PR: https://git.openjdk.org/jdk/pull/11840

Reply via email to