New answers tagged

1 vote

Optimizing code generation for expressions in a compiler

A common method when you have a very, very simple compiler is called “peephole optimisation”: You Look at tiny bits of code and see if you can replace them with something better. Every time you see a ...
gnasher729's user avatar
  • 43.6k
0 votes

Do compilers un-inline recurrent expressions?

The only thing reasonably similar that I have seen regularly: Say you have two places in the same C function with the statement "return x+2;". Normally each would be translated as "take ...
gnasher729's user avatar
  • 43.6k

Top 50 recent answers are included