According to <@U0AAQKT9Q>: &gt;Spread operator alw...
# announcements
r
According to @ilya.gorbunov:
Spread operator always copies an array, so that neither the function nor its caller are required to make defensive copies of the array.
It might be possible for the compiler to optimize such copying away, for example when one vararg function passes its array to another vararg function and doesn't use it itself after, however such optimization has not been baked yet.
https://discuss.kotlinlang.org/t/hidden-allocations-when-using-vararg-and-spread-operator/1640
1
📡 1