3 ms·
CRuby uses this technique on 64bit platforms for years. Edit: the commit https://github.com/ruby/ruby/commit/b3b5e626ad69bf22be3228f847f94e1b68f40888 https://g
by funny_falcon 2y ago
CRuby uses this technique on 64bit platforms for years.
Edit: the commit
https://github.com/ruby/ruby/commit/b3b5e626ad69bf22be3228f847f94e1b68f40888 https://github.com/ruby/ruby/commit/b3b5e626ad69bf22be3228f8...
- scottlamb 2y ago> CRuby uses this technique on 64bit platforms for years. What do you mean by "this technique"? The paper says that CRuby uses tagged objects but could benefit from the innovation being discussed here, a specific bit pattern used to tag floats. See the following quote: > Therefore, implementations that represent floats as tagged pointers could benefit from it with minimal implementation effort. Such popular implementations include CPython [11], CRuby [32] and Google’s V8 [33].
- funny_falcon 2y agoI mean, CRuby does “Float Self Tagging” for years. Paper just has the mistake about CRuby.
- funny_falcon 2y agoIn fact, CRuby successfully combined “Self Tagging” with pointer tagging. Here's the commit: https://github.com/ruby/ruby/commit/b3b5e626ad69bf22be3228f847f94e1b68f40888 https://github.com/ruby/ruby/commit/b3b5e626ad69bf22be3228f8...
- SonOfLilit 2y agoSeems legit. Linked commit contains code for rotating tagged floats so bits 60..62 go to the least significant positions, and a comment about a range of unboxed floats between 1.7...e-77 and 1.7...e77, plus special casing 0.0.