Suppose I have the following code:
arr := make([][]byte, 10000)
for i := range arr {
arr[i] = make([]byte, 10000)
}
Is it faster to iterate over the array like this?
for row := len(arr) {
for col := len(arr[0]) {
// access arr[col][row]
}
}
Or like this?
for col:= len(arr[0]) {
for row := len(arr) {
// access arr[col][row]
}
}