2 ms·
This is called Idiom Recognition, and it was already needed in some compilers in the 1960s. So, unless you're now writing C from a retirement home probably all
by tialaramex 2y ago
This is called Idiom Recognition, and it was already needed in some compilers in the 1960s. So, unless you're now writing C from a retirement home probably all the non-toy compilers you've used had this feature.
- trealira 2y agoYes, but even though there were some advanced compilers back then, particularly for Fortran, there were also really dumb compilers for C and Pascal in the 1980s that didn't do any of that, and just did local register allocation statement by statement (storing to the stack after every statement), which is probably more like what they were used to.