3 ms·
Reduce your working set. Make frequently used data and instructions as small and contiguous as possible. Reuse memory, e.g. store two large objects in a variant
by jzwinck 3y ago
Reduce your working set. Make frequently used data and instructions as small and contiguous as possible. Reuse memory, e.g. store two large objects in a variant if you don't need them at the same time, or instead of calling free() keep the pointer until you need space again. Don't let templates bloat your instruction count. Be open to creating custom data structures when the standard library ones aren't optimal for you.