11 ms·
If you are trying to maximize port utilization, sometimes the exact instruction ordering can make a big difference. Compilers often want to "hoist" loads to th
by nkurz 3y ago
If you are trying to maximize port utilization, sometimes the exact instruction ordering can make a big difference. Compilers often want to "hoist" loads to the top, which can sometimes reduce performance. And sometimes you need a particular addressing mode to avoid a bottleneck.
In general, kierank is right: if you want to full optimize something, and you know what you want the actual code to look like, just write it in assembly. Nothing else gives you full control over loads and stores, and anything else leaves you at the mercy of some future compiler "optimization" stepping in to defeat you.
- dist1ll 3y ago> If you are trying to maximize port utilization, sometimes the exact instruction ordering can make a big difference. Interesting. I thought you'd be at the mercy of the instruction scheduler for aggressive OoO cores.