Aller au contenu

Boxed Primitive Array (ARCH8087)

Ce contenu n’est pas encore disponible dans votre langue.

Key kotlin.performance.boxed-primitive-array · Severity info · Category performance

Flags Array<Int> / Array<Long> / Array<Double> / List<Int> in numeric-heavy code - every element is a boxed object.

val samples: Array<Int> = Array(n) { 0 }
val samples = IntArray(n)

Use IntArray / LongArray / DoubleArray for primitive collections.