4 ms·
> Pointer reads must check the tag ID and throw, which is like a read barrier Usually, "read barrier" is understood as a multithreaded stuff - and OP has nothi
by nobugs 9y ago
> Pointer reads must check the tag ID and throw, which is like a read barrier
Usually, "read barrier" is understood as a multithreaded stuff - and OP has nothing to do with MT. In other words, no "read fence" is necessary (simply because it lives in a perfect single-threaded world). And from this POV, it is extremely difficult to beat this schema with any popular-multithreaded-GC. As a side note, proposed schema DOES allow 'naked' pointers, so relatively-expensive (costing ~4CPU cycles, which is not much to start with) conversion from 'soft' into 'naked' has to be done only _very_ occasionally, and after the conversion, we're working with good old plain pointers, which just happen to be safe due to the way they're used.