Why is it slower when you declare an array like this?

Yes, an Any[] array tends to be slower to compute with than an array with a concrete element type, like Int[].

7 Likes