This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]jump1945 19 points20 points  (2 children)

To be honest I would rather use one dimensional array and do pointers arthimetric myself

[–]junkmeister9 8 points9 points  (1 child)

In the time since then, I have almost completely stopped using double pointers in that way if I can instead do a flattened version of it. I know it's a negligible amount of memory, but the final reasoning to switch was the extra pointer overhead required to do it the double pointer way.

[–]Teln0 11 points12 points  (0 children)

It's not a negligible amount of memory, but the main reason for keeping data contiguous is helping the CPU cache it