Skip to content
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

Short-circuit collection of lists with single query #2024

Merged
merged 1 commit into from
Dec 1, 2023

Conversation

kyri-petrou
Copy link
Collaborator

Micro-optimization when there's only a single query to be collected. Avoids spinning up all the ZQuery collection machinery unnecessarily

Ideally this should be handled by ZQuery directly, but due to the input being a generic Iterable there's no sane way to do this in a performant way across all Scala versions as Scala 2.12 doesn't have a sizeCompare method on collections

@kyri-petrou kyri-petrou merged commit f0d48e0 into series/2.x Dec 1, 2023
10 checks passed
@kyri-petrou kyri-petrou deleted the short-circuit-1-elem-lists branch December 1, 2023 07:19
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