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

Making ILVersionInfo a struct #6392

Merged
merged 2 commits into from
Mar 31, 2019
Merged

Conversation

TIHan
Copy link
Contributor

@TIHan TIHan commented Mar 28, 2019

This makes ILVersionInfo a strong struct type instead of a 4 item tuple. This should free up some memory by not making this an object.

@TIHan
Copy link
Contributor Author

TIHan commented Mar 28, 2019

Looks like I'll need to fix the tests.

@TIHan
Copy link
Contributor Author

TIHan commented Mar 30, 2019

ready

@cartermp cartermp added this to the 16.1 milestone Mar 30, 2019
@cartermp
Copy link
Contributor

It would be good to get some data on what this saves.

@sharwell
Copy link
Member

@cartermp for the heap dump we were reviewing, it is a 20MB reduction in reachable GC objects.

Copy link
Contributor

@cartermp cartermp left a comment

Choose a reason for hiding this comment

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

I like the change (even if perf was negligible, the readability improvements are great)

It would good to set up a quick benchmark to confirm we aren't getting a CPU time hit though

@cartermp cartermp removed this from the 16.1 milestone Mar 30, 2019
@TIHan
Copy link
Contributor Author

TIHan commented Mar 30, 2019

It's not really worth the benchmark IMO; 8 bytes falls under the 16 byte recommendation for structs so the performance impact if anything is practically none.

@sharwell
Copy link
Member

sharwell commented Mar 30, 2019

@cartermp While I agree with you in general, keep in mind this is a targeted improvement. There are many places small reference types are used, but this is the one that is known to have the most direct impact on reachable set. The GC overhead improvement will easily offset any cost in creating or copying these objects.

I'll work with @TIHan to do a better job of providing this information from the start in changes like this.

@TIHan
Copy link
Contributor Author

TIHan commented Mar 30, 2019

@sharwell that you for your help on this. When we do go over it, my intention is to gain knowledge from you to be able to do a lot of this on my own.

@cartermp
Copy link
Contributor

Also is it possible to target this to master and just let the bots move it over to 16.1?

@KevinRansom KevinRansom merged commit 1a0d385 into dotnet:dev16.1 Mar 31, 2019
KevinRansom pushed a commit to KevinRansom/fsharp that referenced this pull request Mar 31, 2019
* Making ILVersionInfo a struct

* Fixing tests
cartermp added a commit that referenced this pull request Mar 31, 2019
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.

4 participants