3 ms·
On the other hand, if you’re not at the point where you care about maximum performance, you may want to shy away from C++ altogether. This implies that there a
by pansa2 5y ago
On the other hand, if you’re not at the point where you care about maximum performance, you may want to shy away from C++ altogether.
This implies that there are very few situations in which C++ with STL is the right choice - which seems contrary to how widely it’s actually used.
- loup-vaillant 5y agoHmm, I’m not sure I agree there. There’s a difference between using C++ because I just want to avoid obvious waste (interpreter, GC pauses…), and actually optimizing my code. I would put v.empty() vs v.size()==0 in the latter category. Day to day, I mostly trust that std::vector is not wasting cycles except on resizes.
- Remnant44 5y agoThis seems like a pretty silly way to look at performance - If I'm working in C++, I 'care' about performance, but performance always exists on a continuum. If I "truly cared" I could write it in assembler; but I don't, because chasing down the diminishing returns isn't worth it. C++ w/STD is a perfectly valid (and extremely powerful!) point in the continuum that runs from Python to Assembly :)