3 ms·
Sorry, that was a typo. The actual test program I use is correct. It was obviously supposed to be: sum += ints[i]
by lobster_johnson 14y ago
Sorry, that was a typo. The actual test program I use is correct. It was obviously supposed to be:
sum += ints[i]
- Djehngo 14y agoNot relevant to the performance test but you can do this for index, value := range mySlice { } and you get the index and the value, or you can do for _, value := range mySlice { } If you only need the value.