0


Is ND4J faster than the normal Java arrays? I've done a basic test by initializing a 100x100 ND4J array then printing it, then did the same for a normal array. The execution time of the normal array is 10x faster. Any idea?

ND4J code:

INDArray a = Nd4j.ones(100,100);
System.out.println(a);

Execution time is around 1700 ms. For standard arrays it is around 150 ms.

me._
  • 51
  • 1
  • 8
  • Surprised this basic question got no answer from the ND4J community. – me._ Jun 18 '18 at 12:45
  • Because microbenchmarking: https://stackoverflow.com/questions/2842695/what-is-microbenchmarking#2842707 Anything involving JNI will require set up time which takes longer than using plain old java. So it depends on how you plan on using them. – reden Jun 29 '18 at 08:12
  • If you don't get an answer from us here, you could always try using our actual real support channels. Github issues or gitter are usually a better way of reaching us than stack overflow. – Adam Gibson Jul 26 '18 at 06:33

0 Answers0