4 ms·
In my experience performance comes from constant vigilance and using every opportunity to choose the performant way of implementing something. Silly bottleneck
by fsloth 1y ago
In my experience performance comes from constant vigilance and using every opportunity to choose the performant way of implementing something.
Silly bottlenecks are half of the perf story in my experience. The other half are a billion tiny details.
- SuperV1234 1y agoBut do you have actual proof for your first claim? Isn't it possible that the "constant vigilance" is optimizing that ~10% that doesn't really matter in the end?
- fsloth 1y agoYes. For example C++ can shoehorn you to a style of programming where 50% of time is spent in allocations and deallocations if your code is otherwise optimal. The only way to get that back is not to use stl containers in ”typical patterns” but to write your own containers up to a point. If you didn’t do that, youd see in the profiler that heap operations take 50% of time but there is no obvious hotspot.
- SuperV1234 1y agoThis is not proof. What you said is not incorrect, but it doesn't prove that your software is fast because you applied small optimizations everywhere.