Paths to New Numeric Types On the Java Platform
summary
Argues concrete paths: prototypes live in the Valhalla branch and a float16 incubator is implemented (a few thousand LOC plus ~1,000 regression tests) and shows a working JShell demo with platform intrinsics (Intel contributed). Explains operator overloading via type classes and witness objects that map operators to methods, but warns JVM bytecode has only ~50 bytecode slots free so adding each primitive like old double/float would not scale. Uses the 2p+2 property to implement float16 arithmetic and highlights FMA and string-rounding as tricky edge cases.
AI-written summary · about
chapters (10)
- 0:00New numeric types in Java
- 1:45Adding more numeric types
- 3:52Project Valhalla’s role
- 7:40Types and numbers in Java
- 16:04Designing numeric types
- 17:28Numeric types for use cases
- 25:11Extensible numeric types
- 33:14Float16 implementation
- 40:18Modeling numeric types
- 48:26Summary and future work
related talks
55mPaths to Support Additional Numeric Types on the Java Platform
01h 02mVectors and the Numerics on the JVM
51mProject Valhalla: Flat Value Types in Java
47mForward to the Past: The Case for Uniformly Strict Floating Point Arithmetic on the JVM
55mNew Bytecodes, New Objects
47mValue Objects - The Next Big Thing in Java
50mThe Cool Thing about Cool Things in Java 16 & 17 LTS
45mMinimal Values Under the Hood
