about summary refs log tree commit diff
path: root/src/libstd/sys/unix/stack_overflow.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-11-13 14:28:57 +0000
committerbors <bors@rust-lang.org>2015-11-13 14:28:57 +0000
commitec8ae4b0eb4860f2ed30763d196a3fe0d7af72c2 (patch)
treeb6c50ce2b6a99a3df901de1a08ccf2b3917762c6 /src/libstd/sys/unix/stack_overflow.rs
parentb12a3582b113c0f9c217f6311ec0d47fd0f79016 (diff)
parent81fcdd4af9c9e99cf2031c5f09a5f1a1dbf3bfc5 (diff)
downloadrust-ec8ae4b0eb4860f2ed30763d196a3fe0d7af72c2.tar.gz
rust-ec8ae4b0eb4860f2ed30763d196a3fe0d7af72c2.zip
Auto merge of #29811 - bluss:binary-heap-sift-less, r=gankro
BinaryHeap: Simplify sift down

Sift down was doing all too much work: it can stop directly when the
current element obeys the heap property in relation to its children.

In the old code, sift down didn't compare the element to sift down at
all, so it was maximally sifted down and relied on the sift up call to
put it in the correct location.

This should speed up heapify and .pop().

Also rename Hole::removed() to Hole::element()
Diffstat (limited to 'src/libstd/sys/unix/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions