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

Add and use collection Capacity properties #316

Merged
merged 6 commits into from
May 26, 2022

Conversation

Washi1337
Copy link
Owner

Includes:

  • Add RefList::Capacity.set
  • Add IMetadataTableBuffer::EnsureCapacity(int)
  • Changes some internal ModuleDefinition::GetXCollection methods to return ICollection<T> instead of IEnumerable<T>.
  • Use of List.Capacity in various reader and builder methods when the number of elements to add is known.

@Washi1337 Washi1337 added this to the 5.0.0 milestone May 18, 2022
@Washi1337
Copy link
Owner Author

Washi1337 commented May 18, 2022

Before (v4.11.0):

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
CoreLib_ReadWrite 981,262.94 μs 19,586.006 μs 18,320.763 μs 33000.0000 13000.0000 2000.0000 298,313 KB

After:

Method Mean Error StdDev Gen 0 Gen 1 Gen 2 Allocated
CoreLib_ReadWrite 959,691.30 μs 17,256.368 μs 21,192.370 μs 32000.0000 13000.0000 2000.0000 287,493 KB

@Washi1337 Washi1337 merged commit 036c408 into development May 26, 2022
@Washi1337 Washi1337 deleted the feature/collection-capacities branch May 26, 2022 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant