Within the CLR there is an optimization for loops that has a termination checkpoint against the length property of the collection/array. However this is not implemented for multidimensional arrays.
In order to achieve better performance when the need arises to use multidimensional arrays its better to use Jagged arrays (Jagged array or arrays)
Example of a jagged array:
int[][] arrJagged = new int[][]{new int[]{1,2,3,4,5},new int[]{2,3,4,5,6}};
Highscalability is Up For Sale
-
Hi everyone,
First, I’d like to sincerely thank everyone who has supported
Highscalability over the years.
We’ve grown together through some interesting...
1 year ago
No comments:
Post a Comment