User | Kudos |
---|---|
8 | |
6 | |
4 | |
3 | |
2 |
Please improve the performance of 'Index Array" for when the index input is constant.
In the attached image (top diagram), the Index Array always resolves to a fixed location in memory (first array element, in this case, but could be any one, if wired a constant index.) The compiler should be able to replace it with the (constant, indexed) address in memory and execute at the same speed as the bottom diagram.
NOTE: This is a contrived example only to demonstrate the overhead of Index Array with a constant index. Even if the array being passed were not to be an array of constants, the compiler should still figure out that "Index Array" will always point to the same memory location and minimize the overhead.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not reproducible with debugging disabled