scalanlp / breeze

Breeze is/was a numerical processing library for Scala.
https://www.scalanlp.org
Apache License 2.0
3.45k stars 693 forks source link

Primitive boxing in CSCMatrix.Builder #766

Closed darkjh closed 4 years ago

darkjh commented 4 years ago

When doing memory profiling of my application, I found out that there's a huge amount of boxing of doubles. After some investigation it seems that this line is the problem:

https://github.com/scalanlp/breeze/blob/master/math/src/main/scala/breeze/linalg/CSCMatrix.scala#L467

It would be nice if we can find a way to avoid boxing here.