"The total size of a static array cannot exceed 16Mb."
Walter Bright
newshound1 at digitalmars.com
Tue Oct 2 11:48:34 PDT 2007
Vladimir Panteleev wrote:
> Thanks, however dynamic arrays are unfortunately slow. To access a
> random element, you need a dereference, a multiplication+addition,
> another dereference, another multiplication+addition. Janice Caron's
> workaround, when modified to use a struct placed in the data segment,
> requires only one dereferencing/multiply+adding - while a static
> array placed in the data segment requires only arithmetics to access.
If you define an array as:
int[10000][] a = new int[10000][100];
only one dereference is required to access the data.
More information about the Digitalmars-d
mailing list