Posts

Showing posts from 2016

Project Valhalla Space-Time Continuum

Image
Project Valhalla Space-Time Continuum Background Currently, for all its talents, Java at the lowest level cannot be as efficient in space and time measurements as a language such as C or C++ due to the simple fact it can only use object references and not linearize objects. This significantly affects applications with large data-sets where the overhead of object headers and references adds up. Project Valhalla will enable far more efficient storage (space) and processing (time) of large data-sets with the introduction of value-types . For example, an array of 10M `PricePoint` objects (each of which has two 64-bit primitive fields) will take 320MB in Java but only 160MB in C++ (these numbers will be justified below). Furthermore processing every object in that array will likely cause many, many CPU cache misses with all the resultant slow down as main-memory is accessed to load the references. Disclaimers I hope to demonstrate equivalent Java and C++ code and