3 ms·
”Any snippet of C-code is transparent in that you know roughly how it is going to be translated into machine code.” …for a definition of ‘roughly’ that has bec
by Someone 9y ago
”Any snippet of C-code is transparent in that you know roughly how it is going to be translated into machine code.”
…for a definition of ‘roughly’ that has become significantly less precise over the past decades.
For example, there was a time where you could be reasonably sure every multiplication in your source code mapped to a multiplication instruction, but that time has long been gone. Constant folding, replacement of multiplications by shifts and loop hoisting aren’t exactly novel techniques.