]> git.lizzy.rs Git - rust.git/commit
deque: Move the shorter part when growing
authorblake2-ppc <blake2-ppc>
Sat, 6 Jul 2013 03:42:45 +0000 (05:42 +0200)
committerblake2-ppc <blake2-ppc>
Sat, 6 Jul 2013 05:26:04 +0000 (07:26 +0200)
commit8a3267672c43e7cc116e588dd21998d14fc21ba4
treee2847b0d0a7a3d69f1ebb0323058c521931dba44
parent75015c36f9fa6d0958874c1a448d6d67056145ae
deque: Move the shorter part when growing

The deque is split at the marker lo, or logical index 0. Move the
shortest part (split by lo) when growing. This way add_front is just as
fast as add_back, on average.
src/libextra/deque.rs