I'm not @shunter but for what its worth, I always move constants to module scope.  I know for a fact that the Chrome optimizer doesn't even optimize a function unless it thinks it needs to.  I believe it's just good practice.