about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorUlrik Sverdrup <bluss@users.noreply.github.com>2015-11-13 01:54:33 +0100
committerUlrik Sverdrup <bluss@users.noreply.github.com>2015-11-13 13:13:23 +0100
commit81fcdd4af9c9e99cf2031c5f09a5f1a1dbf3bfc5 (patch)
tree19f8cb697799d9536a8977613b2a4784051273d6 /src/rustllvm/RustWrapper.cpp
parent792a9f12cff83186a5426bc6e713fbc11261a4b1 (diff)
downloadrust-81fcdd4af9c9e99cf2031c5f09a5f1a1dbf3bfc5.tar.gz
rust-81fcdd4af9c9e99cf2031c5f09a5f1a1dbf3bfc5.zip
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/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions