From https://www.facebook.com/notes/facebook-engineering/three-optimization-tips-for-c/10151361643253920