Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
core: optimize {option,result}::collect
The bug #11084 causes these collect functions to run about twice as slow as they should because llvm is having trouble optimizing away the closure for some reason. This patch works around that performance bug by using a simple adapter iterator explicitly for capturing if the outer iterator returns an error.
- Loading branch information
Showing
2 changed files
with
44 additions
and
20 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
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
ab1bd3a
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 erickt@ab1bd3a
ab1bd3a
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 erickt/rust/optimizations = ab1bd3a into auto
ab1bd3a
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.
erickt/rust/optimizations = ab1bd3a merged ok, testing candidate = e25eb6b
ab1bd3a
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/106
success: http://buildbot.rust-lang.org/builders/auto-mac-64-opt/builds/107
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-c/builds/107
success: http://buildbot.rust-lang.org/builders/auto-mac-64-nopt-t/builds/107
success: http://buildbot.rust-lang.org/builders/auto-linux-32-opt/builds/110
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-c/builds/111
success: http://buildbot.rust-lang.org/builders/auto-linux-32-nopt-t/builds/110
success: http://buildbot.rust-lang.org/builders/auto-linux-64-opt/builds/116
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-c/builds/111
success: http://buildbot.rust-lang.org/builders/auto-linux-64-nopt-t/builds/110
success: http://buildbot.rust-lang.org/builders/auto-linux-64-x-android-t/builds/113
success: http://buildbot.rust-lang.org/builders/auto-win-32-opt/builds/111
success: http://buildbot.rust-lang.org/builders/auto-win-32-nopt-t/builds/110
ab1bd3a
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 = e25eb6b