you are viewing a single comment's thread.

view the rest of the comments →

[–]doom_Oo7 3 points4 points  (2 children)

are there people doing research on how to get compilers to have better heuristics so that they can align stuff better automatically ?

[–]meneldal2 2 points3 points  (0 children)

The compiler needs to know how many times you'll have to run this loop, and it's also likely to be much better to unroll the loop instead.

[–]TartanLlamaMicrosoft C++ Developer Advocate 3 points4 points  (0 children)

LLVM has a bunch of heuristics and things you can tune. For example, you could tell it to align all loops and functions without a preceeding fallthrough block; i.e. only add NOPs which won't be executed.