Skip to content

Revert "Avoid hanging trying to diff Data and similar collections. (#1644)"#1662

Merged
stmontgomery merged 1 commit intoswiftlang:mainfrom
stmontgomery:revert-1644
Apr 4, 2026
Merged

Revert "Avoid hanging trying to diff Data and similar collections. (#1644)"#1662
stmontgomery merged 1 commit intoswiftlang:mainfrom
stmontgomery:revert-1644

Conversation

@stmontgomery
Copy link
Copy Markdown
Contributor

This reverts the change recently made in #1644. It ended up causing slow type-checking of certain complex expressions passed to #expect, such as this one in particular in the swift-build project:

#expect(output.unsafeStringValue.split(separator: "\n").map({ $0.split("=").0 }).sorted().filter { $0 != "VCToolsInstallDir" && !$0.hasPrefix("ANDROID_") && !$0.hasPrefix("QNX_") } == [
    "LLBUILD_BUILD_ID", "LLBUILD_CONTROL_FD", "LLBUILD_LANE_ID", "LLBUILD_TASK_ID"
])

It appears the new __checkBinaryOperation() overload added in that PR caused type-checking to become more complex and slower for complex expressions such as this. It may be possible to implement an alternate approach for this which checks the type at runtime only, to avoid needing an additional overload.

Related to: rdar://173002947

Checklist:

  • Code and documentation should follow the style of the Style Guide.
  • If public symbols are renamed or modified, DocC references should be updated.

@stmontgomery stmontgomery added this to the Swift 6.4.0 (main) milestone Apr 4, 2026
@stmontgomery stmontgomery self-assigned this Apr 4, 2026
@stmontgomery stmontgomery added bug 🪲 Something isn't working performance 🏎️ Performance issues self-reviewed PR was self-reviewed by a code owner labels Apr 4, 2026
@stmontgomery stmontgomery merged commit a03f5ec into swiftlang:main Apr 4, 2026
24 of 27 checks passed
@stmontgomery stmontgomery deleted the revert-1644 branch April 4, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug 🪲 Something isn't working performance 🏎️ Performance issues self-reviewed PR was self-reviewed by a code owner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant