A D vs. Rust example

H. S. Teoh hsteoh at qfbox.info
Wed Oct 26 18:15:48 UTC 2022


On Wed, Oct 26, 2022 at 05:06:33PM +0000, Don Allen via Digitalmars-d wrote:
[...]
> I speak from decades of performance-analysis experience where I found
> that programmers are horrible at guessing why their programs perform
> as they do. Which leads to the rule "Do the measurements, then we'll
> talk".
[...]

+1, speaking as one who writes C every day and who used to write a ton
of C++, I can say that most C/C++ programmers are lousy at guessing
where the performance bottlenecks actually are.  Most of them (including
myself) get it wrong 99% of the time, and are liable to optimize
prematurely in places that are nowhere near the real bottleneck.  These
days, whenever people try to tell me X or Y is "inefficient", I just
ignore them until they can show me actual measurements. Preferably
profiler output that pinpoints where exactly in the code the program is
spending most of its time in.


T

-- 
People tell me I'm stubborn, but I refuse to accept it!


More information about the Digitalmars-d mailing list