Skip to content

[stdlib] Revert count(where:) #22289

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
Feb 1, 2019

Conversation

airspeedswift
Copy link
Member

This is causing performance problems in the type checker currently, due to conflicts with Collection.count. Temporarily reverting until we can resolve the issue.

@airspeedswift
Copy link
Member Author

@swift-ci please smoke test

@airspeedswift
Copy link
Member Author

/cc @khanlou - sorry about this, will keep you updated on what we find and when we can restore

@khanlou
Copy link
Contributor

khanlou commented Feb 1, 2019

Ah, this is a shame — let me know if there's anything I can do to help!

@airspeedswift airspeedswift merged commit 95a15d1 into swiftlang:master Feb 1, 2019
@jpsim
Copy link
Contributor

jpsim commented Feb 12, 2019

I'd be interested to know why this happens for Collection.count/Sequence.count(where:) but not Sequence.first/Sequence.first(where:).

@xedin
Copy link
Contributor

xedin commented Feb 12, 2019

I am sure that performance is degraded for first and and count, we just didn’t yet observe it in practice probably because they are used less in conjunction with operators...

dan-zheng added a commit to dan-zheng/swift that referenced this pull request May 7, 2019
- Fix `stdlib/public/TensorFlow/CMakeLists.txt`.
  - List `ExecuteOp.swift.gyb` under GYB_SOURCES.
- Replace `count(where:)` with `lazy.filter { ... }.count`.
  - `count(where:)` reverted in swiftlang#22289.
- Fix `ProtocolDecl::computeKnownProtocolKind()`.
- Update `test/TensorFlow/sema_errors.swift`.
  - Unfortunately, diagnostics have regressed.
pschuh pushed a commit that referenced this pull request May 7, 2019
- Fix `stdlib/public/TensorFlow/CMakeLists.txt`.
  - List `ExecuteOp.swift.gyb` under GYB_SOURCES.
- Replace `count(where:)` with `lazy.filter { ... }.count`.
  - `count(where:)` reverted in #22289.
- Fix `ProtocolDecl::computeKnownProtocolKind()`.
- Update `test/TensorFlow/sema_errors.swift`.
  - Unfortunately, diagnostics have regressed.
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.

4 participants