ObjectLayout

An optimised memory layout package

View the Project on GitHub ObjectLayout/ObjectLayout

View the Project JavaDoc ObjectLayout.github.com/ObjectLayout/JavaDoc

ObjectLayout: An optimised memory layout package.

The ObjectLayout package provides some core classes designed with optimised memory layout in mind.

This package expresses specifically useful memory layout and related execution semantics that can be leveraged by JVMs to provide optimised behaviors that are not directly expressible in the Java language. The ObjectLayout package exposes these semantics to Java applications without requiring any language changes.

All ObjectLayout package classes are expected to provide and support their full functionality on all JVMs (of Java SE 5 or above) at reasonable layouts and execution speeds. However, the classes are specifically designed with semantics that would allow an optimised JVM to implement them with improved memory layouts and related execution optimizations.

The StructuredArray class is a good example of this design pattern. StructuredArray is carefully designed to allow a JVM to store it in memory with a layout similar to an array of structs in C-like languages, and to internally use intrinsic representations for the related StructuredArray methods, exposing them to common optimizations. When a JVM optimises StructuredArray in such a way, array access benefits from both direct (as opposed to de-referenced) dead-reckoning index access, as well as from fixed memory strides during streaming operations.

Authors, Contributors, and License

ObjectLayout was authored by Gil Tene (@giltene) and Martin Thompson (@mjpt777) and placed in the public domain, as explained at http://creativecommons.org/publicdomain/zero/1.0/

Support or Contact

Don't call us, We won't call you.