3 ms·
Could you please tell me something more about it? Tagged unboxed data seems to be a nice solution for me.
by xyzzyz 15y ago
Could you please tell me something more about it? Tagged unboxed data seems to be a nice solution for me.
- kingkilr 15y agoWell, the problem with it is it has a negative performance impact on everything else in your codebase, the first time you see any pointer you need to check if it's tagged or not. The advantages are clear: you don't need to allocate anything on the heap for integers. Which means you're sacrificing performance on everything else, for integers. Solutions such as automatic type-specializing containers don't carry this downside, and carry the same upside. For example at the moment PyPy type-specializes dictionaries. Python has a single `dict` type, which can store anything, but we type specialize and fallback if we get it wrong. Similarly, we're working on type-specializng lists, tuples, and user objects. If there's anything more I can answer let me know.