9il on master
Replace deprecated `do` keyword… (compare)
*._lengthsparameter is public and accessible. Please fill issue if it does not.
_lengths.lengthcan be used instead of N.
*._lengthsare mutable. http://docs.algorithm.dlang.io/latest/mir_ndslice_slice.html#.Slice._lengths
isSlice!Treturns the same value as
mir.ndslice, I was going to port a simple lattice Boltzmann fluid dynamics simulation for learning purposes, starting with a collision kernel:
auto uxv = ux[i];
ldmd2 -inline -O -enable-cross-module-inlining -release -boundscheck=off -I mir-algorithm/source/ -output-s matrix_copy.d
ldc2 --version LDC - the LLVM D compiler (1.3.0git-a969bcf): based on DMD v2.073.2 and LLVM 4.0.0 built with LDC - the LLVM D compiler (0.17.5git-64a274a) Default target: x86_64-apple-darwin16.5.0 Host CPU: haswell http://dlang.org - http://wiki.dlang.org/LDC
opIndexcalls don't get inlined, which is expensive by itself and also prohibits all further optimization via alias analysis and ultimately vectorization.
a[i][j]style indexing improved the performance by about 2x, but it's still ~720ms vs 30ms.
dub.selections.jsonand update mir-algorithm version upto
~>0.6.2if you use dub.