Is ND4j use a compiler approach to optimize the sequence of operations on the matrices and vectors (ND4J arrays)? For instance minimizing the memory re-allocation of a previously loaded array, discarding the memory load operations on unaffected rows and etc.
Beyond that, it’s mostly c++ operations underneath the covers. That is all compiled c++ in to a jar file loaded by dl4j. You can find the c++ code base here:
Javacpp is what manages all of the native interop here.
Could you tell us what operations you’re doing? Maybe we can help identify what it is you want to optimize.
I can elaborate more on certain internals once you tell me what you’re looking for.