I don't think we need optimizations like this. You can leave it in for this one but don't make new ones unless you can prove that this results a longer assembly in the compiled version. I'm 99% sure that this calculation is done in parse time and doesn't affect the call time at all. Its much less likely that all JS engines can optimize away the added local variable as a constant.