Skip to content

Memory allocation pitfalls

Mamy Ratsimbazafy edited this page Aug 27, 2020 · 1 revision

There are a couple of common pitfalls that unnecessary allocates memory and may seriously impact performance by:

  • introducing GC latency
  • increasing memory fragmentation
  • introducing unnecessary indirection
  • introducing unnecesary instruction
  • preventing compiler optimizations

Example: https://github.com/status-im/nim-beacon-chain/pull/1573

Those common ways are: