Skip to content

[stdlib] Add custom implementations of removeLast and remove(at:) to Array #14212

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 28, 2018

Conversation

airspeedswift
Copy link
Member

These currently use replaceRange which is way to big to inline. Let's see if these are faster. Not sure if this is covered by benchmarks though.

@airspeedswift
Copy link
Member Author

@swift-ci please test

@airspeedswift
Copy link
Member Author

@swift-ci please smoke benchmark

@airspeedswift airspeedswift requested a review from lancep January 27, 2018 15:49
@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5f42bd8

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 5f42bd8

@airspeedswift
Copy link
Member Author

@swift-ci please test

@swift-ci
Copy link
Contributor

Build failed
Swift Test Linux Platform
Git Sha - 5f42bd8

@swift-ci
Copy link
Contributor

Build failed
Swift Test OS X Platform
Git Sha - 5f42bd8

@airspeedswift
Copy link
Member Author

@swift-ci please smoke benchmark

@airspeedswift
Copy link
Member Author

Benchmarks don't seem to be able to run at the moment. But local benchmarking on my machine suggests this is a win for some use cases. I'm going to merge, and then add some more benchmarks and measure perf using a revert when they're up again.

@airspeedswift
Copy link
Member Author

Also seems to help code size a little bit.

@airspeedswift airspeedswift merged commit 5ed4afe into swiftlang:master Jan 28, 2018
@jrose-apple
Copy link
Contributor

It looks like the implementation isn't actually correct; it's failing under optimization. Reverting for now.

jrose-apple added a commit to jrose-apple/swift that referenced this pull request Jan 29, 2018
…at:) to Array (swiftlang#14212)"

This reverts commit 5ed4afe. It
doesn't appear to be correct when the client is compiled with
optimizations (as in, there's a failing bot).
@swift-ci
Copy link
Contributor

Build comment file:

Build failed before running benchmark.


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants