News for hackers. Stuff that matters.
Re:SSD will fail at 40k power-on hours (2021) by danielheath on Sunday July 10, 2022 @05:57PM (#32049496)
Packing a type flag into the upper bits of a 64 bit value is a reasonably common optimisation in dynamic language implementations (because it lets you use unboxed number arithmetic).
Re:SSD will fail at 40k power-on hours (2021) by KMag on Sunday July 10, 2022 @10:39PM (#32051571)
Or sometimes the lower bits, as at least used to be the case for integers in v8. (Also OCaml, but that's not dynamically typed. It simplifies the garbage collector to at least some times not require a pointer map for each type, just a flag in the object header to indicate if it contains any pointers, and then everything that isn't ints or pointers needs to be boxed.)