Numerical for loops in Scala are known to be slower than their counterparts in other languages, and also generate more garbage, because they are implemented as a composition of very high-level language constructs; details can be found here and here, for instance. This is why the Spires library provides the cfor macro, which implements loops in a significantly more efficient way.
With the above rationale, would the maintainers of this repository agree to the replacing of for with cfor, for improved performance of the benchmarked Scala code?
Numerical
forloops in Scala are known to be slower than their counterparts in other languages, and also generate more garbage, because they are implemented as a composition of very high-level language constructs; details can be found here and here, for instance. This is why the Spires library provides thecformacro, which implements loops in a significantly more efficient way.With the above rationale, would the maintainers of this repository agree to the replacing of
forwithcfor, for improved performance of the benchmarked Scala code?