]> git.lizzy.rs Git - rust.git/commit
std::vec: replace .insert with a small amount of unsafe code.
authorHuon Wilson <dbau.pp+github@gmail.com>
Thu, 19 Dec 2013 02:23:37 +0000 (13:23 +1100)
committerHuon Wilson <dbau.pp+github@gmail.com>
Thu, 19 Dec 2013 03:00:44 +0000 (14:00 +1100)
commit81632513c13495fd269082d35916ebcd91d15658
tree3115d8965dcb8baca15748a7839c07868677da07
parentb6933f8d8b86f78ac7b5f70f0781d794144763a0
std::vec: replace .insert with a small amount of unsafe code.

This makes the included benchmark more than 3 times faster. Also,
`.unshift(x)` is now faster as `.insert(0, x)` which can reuse the
allocation if necessary.
src/libstd/vec.rs