https://kotlinlang.org logo
#mathematics
Title
# mathematics
a

Ahmed hamuda

04/13/2019, 7:34 PM
Welcome @altavir at bottom of this doc https://github.com/mipt-npm/kmath/blob/master/doc/algebra.md there's note
Fields themselves do not solve the problem of JVM boxing, but it is possible to solve with special contexts like MemorySpec.
What do you mean with jvm boxing?
a

altavir

04/14/2019, 7:09 AM
The problem is actually not specific to Java and JVM. There are a lot of articles about it. For example this one: https://docs.oracle.com/javase/tutorial/java/data/autoboxing.html. In short, if you are using some kind of generic objects in your code (for example, abstract numbers), eventually they be represented in memory like references to heap, not by stack-allocated primitives. It has a strong impact on performance. There are currently no good ways to treat the problem in any language (maybe only in Julia).
3 Views