Profiling performance in Scala

Boxing and unboxing of primitive types Using primitive types in parameterized generic classes can lead to some performance degradation in Scala. Type parameters in generic classes cannot be resolved as primitive types and instead becomes Object references. This mean primitive types like Int or Float in type parameters must be converted to and from an…