Float Self-Tagging
Olivier Melan\c{c}on, Manuel Serrano, Marc Feeley

TL;DR
This paper presents self-tagging, a novel method for embedding type information into floating-point numbers using an invertible bitwise transformation, reducing heap allocations and improving performance in dynamic languages.
Contribution
Introduces self-tagging, a new approach that superimposes type info onto floats without heap allocation, leveraging the non-uniform distribution of floats in practice.
Findings
Eliminates heap allocation for most floats in Scheme implementations.
Achieves comparable or better performance on float-intensive benchmarks.
Maintains negligible impact on non-float benchmarks.
Abstract
Dynamic and polymorphic languages attach information, such as types, to run time objects, and therefore adapt the memory layout of values to include space for this information. This makes it difficult to efficiently implement IEEE754 floating-point numbers as this format does not leave an easily accessible space to store type information. The three main floating-point number encodings in use today, tagged pointers, NaN-boxing, and NuN-boxing, have drawbacks. Tagged pointers entail a heap allocation of all float objects, and NaN/NuN-boxing puts additional run time costs on type checks and the handling of other objects. This paper introduces self-tagging, a new approach to object tagging that uses an invertible bitwise transformation to map floating-point numbers to tagged values that contain the correct type information at the correct position in their bit pattern, superimposing both…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsPhysics and Engineering Research Articles
