4 ms·
Fascinating — I had no idea the technique had a name (the Ruby source isn't very heavy on comments). I'll update the article to include it.
by brandur 9y ago
Fascinating — I had no idea the technique had a name (the Ruby source isn't very heavy on comments). I'll update the article to include it.
- wrs 9y agoThis technique is so common in dynamic language implementations that it even has hardware support in some architectures, such as the SPARC TADD instruction that adds two registers and sets a condition code if any of the lower bits were set.
- xfer 9y agoHere is a common-lisp compiler using tagged pointers for some common objects. https://github.com/sbcl/sbcl/blob/master/doc/internals/objects-in-memory.texinfo https://github.com/sbcl/sbcl/blob/master/doc/internals/objec... That is how Lisps speedup list operations since it is the most used data structure.