I have been using this resource to keep track of common pitfalls in the code where your compiler may not optimize the code. I think it would be a good addition to our guidelines for people to refer to, so that we all can catch these scenarios while reviewing if the other person tends to miss them. Here's the link
https://github.com/petkaantonov/bluebird/wiki/Optimization-killers