I have tried to test my code and confronted with st strange:
making local pointers with an EXPLICIT lower bound seems to generate faster code.
Is this right? In case it is, why?
Depends on the compiler - some compilers will generate an assembler listing if requested to do so. You can then compare the ones with and without the lower bound.
Alternatively, in the debugger, set a breakpoint where the code is accessing an array index and have a look at the disassembly.
At a guess, if you specify a lower bound of 0, it will be faster (since it is easier to compute arrays from a 0 index). If it is any other lower bound, the speed will be the same.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.