3 ms·
Huh. I wasn't aware of that trick. I'll look into it. Thanks.
by quotemstr 9y ago
Huh. I wasn't aware of that trick. I'll look into it. Thanks.
- bonzini 9y agoSchorr-Waite works for binary graphs, storing the left/right choice in tag bits. Your block bitmap queue idea is more interesting, perhaps with two levels of bitmaps to scan 64*64 words with a single instruction. For the naive implementation you could either use a stack and tail recurse on the last unmarked cell, or a queue with tail recursion on the first unmarked cell (that is, you push on the queue cells starting at the second unmarked cell, and tail recurse on the first to improve locality of reference). (I wrote GNU Smalltalk's GC in another life :-)).