Just because this sounded pretty interesting, I searched through the V8 codebase for a static defined as 100000, and I found this kInitialMaxFastElementArray
var, which is the subsequently used in the builtin ArrayConstructInitializeElements
function function. While I’m not a c programmer and don’t know the nitty-gritty here, you can see that it’s using an if
loop to determine if it’s smaller than 100,000, and return
ing at different points based on that.