Skip to content

Commit

Permalink
don't use _.flatten() for perf
Browse files Browse the repository at this point in the history
  • Loading branch information
harthur committed May 24, 2012
1 parent cb7f762 commit dbf5286
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hog.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@ function getBlock(matrix, x, y, length) {
for (var i = y; i < y + length; i++) {
var row = matrix[i];
for (var j = x; j < x + length; j++) {
square.push(row[j]);
square = square.concat(row[j]);
}
}
return _(square).flatten();
return square;
}


Expand Down

0 comments on commit dbf5286

Please sign in to comment.