Skip to content

Instantly share code, notes, and snippets.

@teivah
Last active May 27, 2020 17:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save teivah/563b0dff7b3e7742651b05abc47f54d8 to your computer and use it in GitHub Desktop.
Save teivah/563b0dff7b3e7742651b05abc47f54d8 to your computer and use it in GitHub Desktop.
func BenchmarkMatrixCombination(b *testing.B) {
matrixA := createMatrix(matrixLength)
matrixB := createMatrix(matrixLength)
for n := 0; n < b.N; n++ {
for i := 0; i < matrixLength; i++ {
for j := 0; j < matrixLength; j++ {
matrixA[i][j] = matrixA[i][j] + matrixB[i][j]
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment