Skip to content

Commit

Permalink
Minor optimizaiton (reserve matrix rows before appending)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonpas committed Jun 6, 2019
1 parent 28eba49 commit 08eb0a1
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/dlx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ DLX::DLX(Grid sudoku) : sudoku(sudoku) {
matrix.reserve(rows);
for (int i = 0; i < rows; ++i) {
SparseRow row = SparseRow();
row.reserve(columns);
for (int j = 0; j < columns; ++j) {
row.append(false);
}
Expand Down

0 comments on commit 08eb0a1

Please sign in to comment.