3 ms·
IIUC, the optimisation is the same, but all it does is tell the compiler what the hot path is likely to be and so the code won't 'jmp' to it; the instructions a
by secondcoming 6y ago
IIUC, the optimisation is the same, but all it does is tell the compiler what the hot path is likely to be and so the code won't 'jmp' to it; the instructions are likely to be in I-cache.
- steerablesafe 6y agogcc (maybe other compilers too) can put the cold path to a separate section, so it further improves happy-path code cache locality.