Presented at !!Con West 2019: http://bangbangcon.com/west In this talk we’ll talk about NaN-boxing, an especially beautiful bit-level hack that might be running on your computer right now! The floating point standard defines a special value called Not-a-Number (NaN) which is used to represent, well, things that aren’t numbers. Double precision NaNs come with a payload of 51 bits which can be used for whatever you want — including using the payload to represent all other non-floating point values and their types at runtime in dynamically typed languages. We’ll look at some juicy details of JavaScriptCore, Safari’s javascript interpreter, where everything is a float!
Get notified about new features and conference additions.