2 ms·
All of those create a copy of the array and do not modify the original, which may be important on cases like audio manipulation, where there are for instance 44
by rezonant 5y ago
All of those create a copy of the array and do not modify the original, which may be important on cases like audio manipulation, where there are for instance 44,000 array entries per second. Furthermore, I wonder if D could automatically vectorize this operation when SSE/MMX style instructions are available?
- p0nce 5y agoIt's not D that auto-vectorize such expression, it's the backend. Those "array ops" makes it easier for the compiler to convey that to the backend, though. Using LDC + arrays ops is often the best thing you can do speed-wise.