Fast multidimensional Arrays

Steinhagelvoll via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Mon Aug 29 05:13:50 PDT 2016


Ok I added release and implemented the benchmark for 500 
iterations, 10000 are not reasonable. I build on the 2d array 
with LDC: http://pastebin.com/aXxzEdS4 (changes just in the 
beginning)

$ ldc2 -release -O3 nd_test.d
$ ./nd_test
12 minutes, 18 secs, 21 ms, 858 μs, and 3 hnsecs

, which is 738 seconds. Compared to (also 500 iterations)

ifort -O3 -o fort_test test.f90 && ./fort_test
  time:    107.4640    seconds


This still seems like a big difference. Is it because I don't use 
a continous piece of memory, but rather a pointer to a pointer?


More information about the Digitalmars-d-learn mailing list