Zum Inhalt springen

Boxed Primitive Array (ARCH8087)

Dieser Inhalt ist noch nicht in deiner Sprache verfügbar.

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.