projects
/
remoteglot
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
7314c16
)
Small microoptimization in Board::clone.
author
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Sat, 20 Sep 2014 12:09:22 +0000
(14:09 +0200)
committer
Steinar H. Gunderson
<sgunderson@bigfoot.com>
Sat, 20 Sep 2014 12:09:22 +0000
(14:09 +0200)
Board.pm
patch
|
blob
|
history
diff --git
a/Board.pm
b/Board.pm
index
ff2828a
..
3d83278
100644
(file)
--- a/
Board.pm
+++ b/
Board.pm
@@
-25,9
+25,7
@@
sub clone {
my $nb = [];
for my $row (0..7) {
- for my $col (0..7) {
- $nb->[$row][$col] = $board->[$row][$col];
- }
+ $nb->[$row] = [ @{$board->[$row]} ];
}
return bless $nb;