Skip to content

Conversation

@harlanhaskins
Copy link
Contributor

This replaces the 2-7ary variadic gyb'd tuple comparison implementations with unified variadic implementations that short-circuit when the first element fails the test.

Unfortunately, the existing gyb'd tuple comparison entry points are all ABI, so we need to leave them in. However, we can just forward them along to the variadic implementation and rename them so they no longer conflict from an overload perspective.

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@slavapestov
Copy link
Contributor

@swift-ci Please benchmark

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test
@swift-ci please benchmark

@harlanhaskins
Copy link
Contributor Author

@swift-ci please smoke test

@harlanhaskins
Copy link
Contributor Author

harlanhaskins commented Nov 7, 2025

00:47:36 /Users/ec2-user/jenkins/workspace/swift-PR-macos-smoke-test/branch-main/swift/stdlib/public/core/LegacyInt128.swift.gyb:763:23: error: binary operator '>' cannot be applied to operands of type '_Wide2<F>' (aka '(high: F, low: F.Magnitude)') and '(F, F.Magnitude)'

Ah, this is a fun one -- @slavapestov This seems related to the concessions here: https://forums.swift.org/t/variadic-generics-and-tuple-shuffle-conversions/60694

It looks like we explicitly are not performing the (high: F, low: F.Magnitude) -> (F, F.Magnitude) conversion which would match correctly against the variadic function here. Are there any plans to support this? Or is this expected to work as-is, and this is just a bug?

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