Thanks for the praise, Jams. :)
mindstorms: Yes, because you're avoiding two function calls, any and all error checking, and index calculations for dimensions you're not using. Also, I've heard banks are slow - although I suspect and hope this is only in Debug mode.
By the way, if you use integer math you can simplify your 1d-to-2d index calculations:
x% = n% mod width%
y% = n% / width%
And why isn't your 2d-to-1d index calculation simply:
n% = x% + y% * width%
mindstorms: Yes, because you're avoiding two function calls, any and all error checking, and index calculations for dimensions you're not using. Also, I've heard banks are slow - although I suspect and hope this is only in Debug mode.
By the way, if you use integer math you can simplify your 1d-to-2d index calculations:
x% = n% mod width%
y% = n% / width%
And why isn't your 2d-to-1d index calculation simply:
n% = x% + y% * width%