Re: efficiency question: type versus array



In article <m1hdfzbig2.fsf@xxxxxxxxxxxxxxxxxxxxx>,
Ushnish Basu <ubasu@xxxxxxxxxxxxxxx> wrote:

>My question is: which one will be more efficient in terms of memory access?

In general, a 2D array allows many optimizations that a 1D array of 1D
arrays allows. This is an area where many C++ programs lose
performance. I also find the 2D array notation easier to read, but
that's a personal preference.

-- greg

.