2 ms·
> As for 3 instructions for array access, in a simple loop a compiler can convert index access to pointer increment. In such a simple loop where you access one
by teo_zero 2mo ago
> As for 3 instructions for array access, in a simple loop a compiler can convert index access to pointer increment.
In such a simple loop where you access one field in each iteration, yes. If you happen to access more fields, or the same field in different arrays, then you have more pointers to increment.
- hajile 2mo agoIf such an instruction is so obviously important, we'll see it start popping up as a custom instruction in some cores then it will get adopted as an official extension by other companies trying to stay competitive.