This JavaScript implementation of range is fast. What are it's downsides? This implementation of range() is very fast:

RANGE = []; for (var i=0; i&lt;65536; ++i) RANGE.push(i-32768);
range = function(a,b){ return RANGE.slice(a+32768,b+32768); };


Are there downsides in using this approach?
relatively speaking-

1) its a bit heavy on the memory use, requiring the memory for a property + mem of a number for each integer in the possible range

2) always consumes the memory and cpu needed to intialize, even if the script never has use for it.