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

Avoid intermediate mapping in ZincWorkerImpl #2661

Merged
merged 1 commit into from
Jul 16, 2023

Conversation

lolgab
Copy link
Member

@lolgab lolgab commented Jul 15, 2023

Profiled Mill compiling Mill itself and 0.07% of the time was spent in mapping the result of compileMixed0 to CompilationResult.
This changes the compileInternal method to already use the right types so less conversions are needed.

@lolgab lolgab requested review from lefou and lihaoyi July 15, 2023 12:26
Copy link
Member

@lefou lefou left a comment

Choose a reason for hiding this comment

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

The change looks good. But I don't think we save anything here, as the measured wrapping "overhead" comes most likely from the PathRef construction, which we now do in another place.

@lolgab
Copy link
Member Author

lolgab commented Jul 16, 2023

The change looks good. But I don't think we save anything here, as the measured wrapping "overhead" comes most likely from the PathRef construction, which we now do in another place.

The gain is very small but doesn't make the code less readable so totally worth it for me.
profile

@lolgab lolgab merged commit 95c2ea2 into com-lihaoyi:main Jul 16, 2023
37 checks passed
@lolgab lolgab deleted the avoid-intermediate-map branch July 16, 2023 12:29
@lefou lefou added this to the 0.11.2 milestone Jul 16, 2023
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.

None yet

3 participants