Hi, in Forest 6 we have replaced the standard array functions by our own custom system, which is much more efficient handling huge arrays.
I've done some tests with your script, and these are the results:
10k items: 6.992 sec.
100k items: 119.412 sec.
As you can see, now is much more manageable.
Checking the code, i cannot find more ways to optimize it. I guess now the bottleneck is Maxscript and the internal Max workflow.
Hopefully the first beta of FP6 will be available very soon. The code is completed, and we are now reorganizing and adding new libraries.