Skip to content

[CSOptimizer] Few tweaks to make unapplied disjunction and literal array arguments faster #78357

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
Jan 3, 2025

Conversation

xedin
Copy link
Contributor

@xedin xedin commented Dec 24, 2024

  • When disjunction is not applied, don't only bump its score but also favor all of the choices that don't require application because selection algorithm uses that for comparison.

    This is important for situation when property is overload with a method i.e. Array.count.

  • Extend candidate/parameter matching to support array literals

    Match [...] to Array<...> and/or ExpressibleByArrayLiteral
    conforming types. This is very helpful for expressions like:
    [...] + [...].

@xedin
Copy link
Contributor Author

xedin commented Dec 24, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Dec 24, 2024

@swift-ci please test source compatibility release

@xedin xedin force-pushed the too-complex-with-count branch from e684fe1 to e4b35f9 Compare December 24, 2024 06:09
@xedin
Copy link
Contributor Author

xedin commented Dec 24, 2024

@swift-ci please test

@xedin xedin force-pushed the too-complex-with-count branch from e4b35f9 to 8a03ac0 Compare December 25, 2024 01:09
@xedin xedin changed the title [CSOptimizer] Favor choices that don't require application [CSOptimizer] Few tweaks to make unapplied disjunction and literal array arguments faster Dec 25, 2024
When disjunction is not applied, don't only bump its score
but also favor all of the choices that don't require application
because selection algorithm uses that for comparison.

This is important for situation when property is overload with
a method i.e. `Array.count`.
@xedin xedin force-pushed the too-complex-with-count branch from 8a03ac0 to 77caa71 Compare December 25, 2024 01:15
@xedin
Copy link
Contributor Author

xedin commented Dec 25, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Dec 25, 2024

@swift-ci please test source compatibility

…terals

Match `[...]` to Array<...> and/or `ExpressibleByArrayLiteral`
conforming types. This is very helpful for expressions like:
`[...] + [...]`.
@xedin xedin force-pushed the too-complex-with-count branch from 77caa71 to 8a304f8 Compare December 25, 2024 20:51
@xedin
Copy link
Contributor Author

xedin commented Dec 25, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Dec 25, 2024

@swift-ci please test source compatibility release

@xedin xedin force-pushed the too-complex-with-count branch from 8e29d44 to cfd34e5 Compare December 30, 2024 18:30
@xedin
Copy link
Contributor Author

xedin commented Dec 30, 2024

@swift-ci please test

1 similar comment
@xedin
Copy link
Contributor Author

xedin commented Dec 31, 2024

@swift-ci please test

@xedin
Copy link
Contributor Author

xedin commented Jan 3, 2025

@swift-ci please smoke test macOS platform

@xedin xedin merged commit 5cac7db into swiftlang:main Jan 3, 2025
5 checks passed
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.

1 participant