Comment

Comment by likoya

I put labels on each return, and took their addresses to get the base and delta. The creator of c++ always says that such kind of code has to work "because it is c++", meaning the programmer should be able to do whatever he wants. Anyways I also used assembler to make it work (had to include nop instructions to pad the addresses, because the goto can't go to any byte. So it consumed a lot of instruction l1 cache, which is not as bad as data cache, but it ended being slow anyways because gotos trigger branch prediction. In the end the fastest method was to pack the array in uint64 and do (x >> i) & 111b
parent likoya 5 days ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton