A revolution!

Indeed! I further dissected the index calculation formula for a contigious n-dimensional array and found a way to completely drop all multiplication inside the formula when iterating through a complete array of them. This effectively reduces the index calculation amount from several multiplications and addition to a single increment each cell and a mul/set pair for each border pixel. I'm really amazed that I found this out and I'm eager to do something with it. But I don't believe that this would give advantage from random shapes likes lines or polygons since the amount of calculation needed to get change of position each iteration won't give any benefit there. Too bad, but also too good to not use it! My tree's fruits finally pay off once again! I hope that this will somehow be of use to my later life or game programming.

PS: And the even more awesome thing about is that I can combined with my current n-dimensional loop macros - flawlessly!

No comments: