Skip to content

[stdlib] Restore @inline(__always) on Collection.first #9593

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 1 commit into from
May 14, 2017

Conversation

airspeedswift
Copy link
Member

This was dropped when #8990 was merged.

@airspeedswift
Copy link
Member Author

@swift-ci please smoke test and merge

@dabrahams
Copy link
Contributor

but was it making a difference?

@swift-ci swift-ci merged commit 25c9fae into swiftlang:master May 14, 2017
@airspeedswift
Copy link
Member Author

A good question (though assume you put it your PR for a reason :) but since my reverting of it was unintended I figured I should undo that first then experiment. I'll raise a separate PR to benchmark and see if it's actually helping. Possibly .last should be given the same treatment? Though I doubt we have benchmarks that exercise it much.

@dabrahams
Copy link
Contributor

You could just benchmark this change and then you'd know.

The reason for all those speculative reversions was that I discovered a flaw in my measurement methodology after I had gone and added a whole bunch of @inline(__always). There's every chance that this was not having any substantial effect, or isn't, now that Roman has updated the inliner.

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