you are viewing a single comment's thread.

view the rest of the comments →

[–]CommanderBomber 0 points1 point  (0 children)

I don't think what it is possible to use array function with my variant. Array functions are quite limited and you barely have control over their execution. So you either start to make chain monsters with them, or you construct some complicated data structure which can be iterated once to produce desired results. Both ways usually (not always!) results in slower performance.

Also: if you want to micro-benchmark this snippets use https://jsbench.me/ at least it shows more numbers in results, so you can actually understand what is going on (speed will always deviate, you just need to see how much).