5 ms·
If either of those affects performance there are WAY too many memory allocations happening.
by BubRoss 6y ago
If either of those affects performance there are WAY too many memory allocations happening.
- shigeo 6y agoSure, but I guess that's the point --- the GCs in Java and Go can handle any allocation pattern you throw at them reasonably well, but there's not, as far as I know, such a "one-size-fits-all" solution in C++ (not that it needs one.)
- BubRoss 6y agoI'm not sure I would call 'using your entire CPU to do trivially small heap allocations' a pattern unless you mean that it's a pattern you see when people wonder why their software is so slow.
- MauranKilom 6y agoIf you don't want to plan out proper (as in performant) data structures and memory management, C++ is indeed the wrong language. And judging by the stuff discussed in comments above, this is exactly what happened here.