4 ms·
If I had a nickel for every article about avoiding implicit boxing in gc-heap languages...
by mwkaufma 8mo ago
If I had a nickel for every article about avoiding implicit boxing in gc-heap languages...
- adonovan 8mo ago...you would have the same balance as before, because this is not an article about implicit boxing. ;-)
- mwkaufma 8mo ago"The reason is that the compiler decided to allocate the backing store on the stack. Because it knows what size it needs to be (10 times the size of a task) it can allocate storage for it in the stack frame of process2 instead of on the heap1. Note that this depends on the fact that the backing store does not escape to the heap inside of processAll." This is definitionally small-object boxing optimizations.
- anematode 8mo ago... no, that's not boxing. Boxing is storing value types on the heap.