logoalt Hacker News

stinkbeetletoday at 7:34 AM1 replyview on HN

You can use this same property of xor to make a double-linked list using just one pointer per item, which is xor of the previous and next item addresses!


Replies

Panzerschrektoday at 8:21 AM

Except such "optimization" may affect performance on CPUs with speculative execution/prediction. But it should be measured.