I was looking at some code and have seen these comments, how does promoting a function to global help performance?
// this function is promoted to be global
// to make firefoxs jit happy - URGH
function clamp(x, min, max) {
if(x < min) return min;
if(x > max) return max-1;
return x;
}