-
Notifications
You must be signed in to change notification settings - Fork 12.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
std::vec: use some unsafe code to optimise
remove
.
Also, add `.remove_opt` and replace `.unshift` with `.remove(0)`. The code size reduction seem to compensate for not having the optimised special cases. This makes the included benchmark more than 3 times faster.
- Loading branch information
Showing
1 changed file
with
74 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
acd2be4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
saw approval from alexcrichton
at huonw@acd2be4
acd2be4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merging huonw/rust/opt-unsafe-vec = acd2be4 into auto
acd2be4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
huonw/rust/opt-unsafe-vec = acd2be4 merged ok, testing candidate = e86cdaf
acd2be4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
all tests pass:
success: http://buildbot.rust-lang.org/builders/auto-mac-32-opt/builds/3079
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-c/builds/922
success: http://buildbot.rust-lang.org/builders/auto-mac-32-nopt-t/builds/924
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/3085
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/2187
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/2188
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/3096
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/2185
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/2190
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/3098
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/2186
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/2189
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android/builds/2265
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/3084
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-c/builds/2186
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/2190
success: http://buildbot.rust-lang.org/builders/auto-bsd-64-opt/builds/2860
acd2be4
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fast-forwarding master to auto = e86cdaf