use unstable sort, small optimization
This commit is contained in:
parent
de02670685
commit
a4cbde9713
1 changed files with 1 additions and 1 deletions
|
|
@ -93,7 +93,7 @@ pub fn alphabeta(mut game: Game, depth: u8, mut alpha: i8, mut beta: i8) -> (Boa
|
||||||
// since we're considering the "best" moves first.
|
// since we're considering the "best" moves first.
|
||||||
// We do this by mapping moves to ranked moves and then sorting.
|
// We do this by mapping moves to ranked moves and then sorting.
|
||||||
let mut moves = explode_board(moves).map(MoveRank::from).collect::<Vec<_>>();
|
let mut moves = explode_board(moves).map(MoveRank::from).collect::<Vec<_>>();
|
||||||
moves.sort();
|
moves.sort_unstable();
|
||||||
let moves = moves
|
let moves = moves
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(MoveRank::into_inner)
|
.map(MoveRank::into_inner)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue