title: Does Functional programming allow better runtime compiler optimizations?
body: <p><em>NOTE: Already made this a Wiki. I don't care what this question is tagged as, as long as there is a good discussion.</em></p>
  
  <p>I've heard that since in pure functional programs, there are no side effects and values dont mutate, it makes it easier for the compiler to make more runtime optimizations. To what extent is this true?</p>
  
  <p>If this is true, my next concern is what is the loss in freedom that we are trading this for? I mean, in languages like C++/C the developer is totally in control and can tweak a lot of things. If we give away this job to the compiler, we lose that opportunity. The bright side of this is that even a non-expert programmer can write good code. Furthermore, these days with so many layers of cache in the machine architecture, may be even an expert cannot really do anything worthwhile. So, delegating this job to the compiler that knows more about the underlying architecture than the programmer does, is a good idea.</p>
  
  <p>What are your suggestions? </p>