You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
go-perfbook already explains how reducing heap allocations is a way to speed up execution and reduce GC delays, etc. I noticed, through example code from another developer, that it is possible to write tests such that one can effectively ensure a certain bound on heap allocations. This may be helpful for code/libraries that want to ensure/guarantee a low allocation count in specialized libraries, as well as prove that performance does not degrade (without noticing) over time due to changes in own code, Go standard library or run-time.
go-perfbook already explains how reducing heap allocations is a way to speed up execution and reduce GC delays, etc. I noticed, through example code from another developer, that it is possible to write tests such that one can effectively ensure a certain bound on heap allocations. This may be helpful for code/libraries that want to ensure/guarantee a low allocation count in specialized libraries, as well as prove that performance does not degrade (without noticing) over time due to changes in own code, Go standard library or run-time.
The test TestAllocations illustrates this.
The text was updated successfully, but these errors were encountered: