In JS are the lengths of an array cached or does it depend on the different engines/browsers?
Normally I'd assume that browsers' JS engines are pretty dumb and cache the length of arrays, for example:
var a = [ ];
var l = l;
function arrayPush(i)
{
l = a.push( i );
}
function arrayPop()
{
var r = a.pop();
l = a.length;
return r;
}
(as a brief example, of course it'll be silly to replicate every array function but if it speeds stuff up it then it's worth it)