> If you always want DMD never to bounds check for specific code, you just > can write "a.ptr[index]" instead of "a[index]" (when a is an array). > That's because array.ptr returns a pointer to the first element, and > using [] on a pointer works exactly like C pointer math. The good thing > about this is that you still can use array slices and the .length field, > so the code most likely is less messy than the C version would be.
Interesting tip, thanks !