]> Cypherpunks repositories - gostls13.git/commit
container/heap: optimization when selecting smaller child
authorltnwgl <ltnwgl@gmail.com>
Fri, 24 Mar 2017 03:55:22 +0000 (11:55 +0800)
committerRobert Griesemer <gri@golang.org>
Tue, 9 May 2017 03:38:37 +0000 (03:38 +0000)
commitf5352a7763c8f96f7f092990d64339eae0623263
tree369c9fa202fe2e09dea3f93210ce093d29e4f27a
parent716761b8b13926ef4a82dcb4ffc324066779239c
container/heap: optimization when selecting smaller child

In down(), if two children are equal, we can choose either one.
Inspired by https://codereview.appspot.com/6613064/

Change-Id: Iaad4ca5e2f5111bf3abb87f606584e7d274c620b
Reviewed-on: https://go-review.googlesource.com/38612
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Griesemer <gri@golang.org>
src/container/heap/heap.go