I'm writing a Google Chrome extension. As the JavaScript files are loaded from disk, their size barely matters.
I've been using Google Closure Compiler anyway, because apparently it can make performance optimizations as well as reducing code size.
But I noticed this at the top of my output from Closure Compiler:
var i = true, m = null, r = false;
The point of this is obviously to reduce the filesize (all subsequent uses of true/null/false throughout the script can be replaced by single characters).
But surely there's a slight performance hit with that? It must be quicker to just read a literal true keyword than look up a variable by name and find its value is true...?
Is this performance hit worth worrying about? And is there anything else Google Closure Compiler does that might actually slow down execution?