Find heap allocations and nail them down to save 0.67µs (37%) on a Raspberry Pi 3 in an inner loop Heap optimization For hot code paths, it is important to reduce heap allocations. This reduces the GC pressure and it is generally a speed optimization at the same time. We’ll see real world examples below. Reducing heap usage can be done in a few ways and I’ll show case three in this post: Favor con
![Heap optimization means speed optimization](https://cdn-ak-scissors.b.st-hatena.com/image/square/b50a0fe6642744424d8910b89ced23d634906104/height=288;version=1;width=512/https%3A%2F%2Fmaruel.ca%2Fpost%2Fheap_speed%2Fimg%2Fsrc.png)