upvote
I think it’s making a case that normally you shouldn’t even bother benchmarking it, unless you know that it’s in a critical hot path.
reply
I must add that code is on the hot path only under two conditions:

- the application is profiled well enough to prove that some piece of code is on the hot path

- the developers are not doing a great job

reply
This long post is demonstrating that Knuth’s advice, “premature optimization is the root of all evil,” is still one of the first heuristics you should apply.

The article describes a couple of straw men and even claims that they’re right in principle:

> Then someone on the team raises an eyebrow. “Isn’t that an extra function call? Indirection has a cost.” Another member quickly nods.

> They’re not wrong in principle.

But they are wrong in principle. There’s no excuse for this sort of misinformation. Anyone perpetuating it, including the blog author, clearly has no computer science education and shouldn’t be listened to, and should probably be sent to a reeducation camp somewhere to learn the basics of their profession.

Perhaps they don’t understand what a compiler does, I don’t know, but whatever it is, they need to be broken down and rebuilt from the ground up.

reply