You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tell compiler which way jumps will usually go in mbfl_memory_device.c
Several functions in this file are very "hot". While tweaking the code to see if I could
make it faster, and looking at disassembly of resulting code, I noticed that gcc -O3 was
inconsistent in how it handled `if`/`else` statements. Sometimes, gcc would put the body
of an `if` statement on the 'jump taken' side of a conditional branch, and at other times,
it would put it on the 'jump not taken' side.
Use `EXPECTED`/`UNEXPECTED` macros to (hopefully) help the compiler organize the code
for better static branch prediction.
0 commit comments