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

Fix primary assembly heuristic + clean up duplicate code #17151

Merged
merged 6 commits into from
May 21, 2024

Conversation

vzarytovskii
Copy link
Member

@vzarytovskii vzarytovskii commented May 15, 2024

Description

This fixes primary assembly check by:

  1. Using Equals, which will use span helpers on latest runtime
  2. Fixing the logic (before it used Compare <> 0 || ... now its just Equals ||, which will exit on the first match, as opposed to checking everything.
  3. It will also now inline correctly (see stacks in the attached profiles.

It also gets rid of specific cache for int32 in the ilreader, as well as hides stats under define.

FSI startup is a bit faster on M2, should be more noticeable on older/slower machines:

Before:
image

After:
image

Before: dotnet_trace_before.speedscope.json
After: dotnet_trace_after.speedscope.json

@vzarytovskii vzarytovskii requested a review from a team as a code owner May 15, 2024 18:19
@vzarytovskii vzarytovskii changed the title Alloc experiments Fix primary assembly heuristic + clean up duplicate code May 15, 2024
Copy link
Contributor

github-actions bot commented May 15, 2024

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

  Co-authored-by: vzarytovskii <1260985+vzarytovskii@users.noreply.github.com>
@dotnet dotnet deleted a comment from github-actions bot May 15, 2024
@vzarytovskii
Copy link
Member Author

vzarytovskii commented May 15, 2024

Also a note - we spend quite some time generating PDB in all scenarios, even though it will never be used. Around 1/3rd of total assembly generation time, for example on my M2 it takes 50ms to generate metadata and additional 24ms to generate pdb.

@KevinRansom KevinRansom added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label May 15, 2024
@abonie
Copy link
Member

abonie commented May 17, 2024

Also a note - we spend quite some time generating PDB in all scenarios, even though it will never be used. Around 1/3rd of total assembly generation time, for example on my M2 it takes 50ms to generate metadata and additional 24ms to generate pdb.

Should we create an issue about it to keep track?

@vzarytovskii
Copy link
Member Author

vzarytovskii commented May 20, 2024

Also a note - we spend quite some time generating PDB in all scenarios, even though it will never be used. Around 1/3rd of total assembly generation time, for example on my M2 it takes 50ms to generate metadata and additional 24ms to generate pdb.

Should we create an issue about it to keep track?

I did already. Not sure why it didn't link it here.

Nvm, it did: #17152

@T-Gro T-Gro merged commit e3681c7 into dotnet:main May 21, 2024
33 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

4 participants