Fast multidimensional Arrays
Daniel Kozak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Mon Aug 29 05:59:24 PDT 2016
Dne 29.8.2016 v 14:13 Steinhagelvoll via Digitalmars-d-learn napsal(a):
> 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?
It is possible, there is a lot of indirections
More information about the Digitalmars-d-learn
mailing list