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

More executor optimizations #2052

Merged
merged 1 commit into from
Dec 20, 2023
Merged

More executor optimizations #2052

merged 1 commit into from
Dec 20, 2023

Conversation

kyri-petrou
Copy link
Collaborator

The main optimization in this PR is that we avoid an extra flatMap for each field when the field is not nullable.

@@ -111,7 +112,13 @@ object Executor {
i += 1
remaining = remaining.tail
}
reduceList(lb.result(), Types.listOf(currentField.fieldType).fold(false)(_.isNullable))
reduceList(
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually faster? fold is inline.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Inlining via the @inline annotation only works in Scala 2 and only if it's enabled via the -opt-inline-from: compiler flag (which we don't have enabled - I think we might want to enable that one).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah :/

@kyri-petrou kyri-petrou merged commit 2febf6d into series/2.x Dec 20, 2023
10 checks passed
@kyri-petrou kyri-petrou deleted the executor-optimizations branch December 20, 2023 05:16
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