Context: I\'m building a little site that reads an rss feed, and updates/checks the feed in the background. I have one array to store data to display, and another which stor
Like @maerics said, your target machine and browser will determine performance.
But for some real world numbers, on my 2017 enterprise Chromebook, running the operation:
console.time();
Array(x).fill(0).filter(x => x < 6).length
console.timeEnd();
x=5e4 takes 16ms, good enough for 60fpsx=4e6 takes 250ms, which is noticeable but not a big dealx=3e7 takes 1300ms, which is pretty badx=4e7 takes 11000ms and allocates an extra 2.5GB of memorySo around 30 million elements is a hard upper limit, because the javascript VM falls off a cliff at 40 million elements and will probably crash the process.