Skip to content

Minor Release: Performance optimization to minimize memory allocs on allocation of Set

Choose a tag to compare
@deckarep deckarep released this 14 Mar 17:30
· 9 commits to main since this release

What's Changed

  • Utilizes map capacity hint in all constructors to minimize memory allocation churn with instantiation and population of Set - originally proposed by @fy0
  • New *WithSize constructors: NewThreadUnsafeSetWithSize and NewSetWithSize to allow for minimizing allocation churn and unnecessary resizing of internal state.
  • Adds a RemoveAll convenience method

Full Changelog