In the real world, it sometimes does make a big difference when you use one line of code instead of two, especially in loops that run a large number of times.
I'm very much not a fan of difficult-to-maintain code, but in certain rare instances its use is justified. Any such uses should be well-documented via code comments.For that to be significant in a particular situation you would have to know that
- the harder-to-maintain code does actually provide a performance gain; and
- the cost of harder-to-maintain code is outweighed in this particular situation by the value gained by performance improvement
With regard to item 2 above, I've written assembly code (using AVX-512 instructions) that outperforms optimized C code. The code, both C and assembly, iterates through fairly large arrays of floats and picks out all of the array elements that are larger than some specified value. I've timed both code chunks, and my assembly code runs faster than the C code, even when the C code is fully optimized for speed.
Compilers usually produce well-optimized code, but if you know what you're doing, you can sometimes write code that is faster.