|
|
|
|
|
by lightcatcher
3545 days ago
|
|
There's something to be said to be familiar enough with the optimization that you can predict assembly that is not a direct translation of what you're writing. For instance, when writing a scalar-processing loop over a fixed length array with no dependency between iterations you can reasonably expect the compiler to convert to SIMD instructions and do some unrolling. It's not too difficult to check the binary that this happened, and if it doesn't happen you just write it yourself with intrinsics. I often think of C + compiler's optimization passes as a "scripting language for assembly". |
|