Skip to content

[4.0] Move Dictionary(grouping:by) down a level #10450

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
Jun 23, 2017

Conversation

natecook1000
Copy link
Member

This is a cherry pick of #10275, #10279, and #10306.

  • Explanation: Moves the implementation of the Dictionary(grouping:by:) initializer down to the buffer level to avoid repeatedly duplicating arrays while building the grouped dictionary.
  • Scope: This changes the implementation of a single initializer; there is no external change.
  • Radar/SR: rdar://problem/32899123
  • Risk: Low
  • Testing: Added a benchmark to cover the initializer's performance. PR passed existing unit and validation tests.

When testing quadratic behavior, remember to repeat small amounts of the
behavior several times, not to increase the N, which is squared. 🙄
@natecook1000
Copy link
Member Author

@swift-ci Please test

@airspeedswift airspeedswift merged commit 31b7e0e into swiftlang:swift-4.0-branch Jun 23, 2017
@natecook1000 natecook1000 deleted the nc4-grouping branch June 23, 2017 18:20
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.

2 participants