Why C++ compiles slowly

dsimcha dsimcha at yahoo.com
Wed Aug 25 11:47:48 PDT 2010


== Quote from Walter Bright (newshound2 at digitalmars.com)'s article
> Steven Schveighoffer wrote:
> >> Just goes to show how useful a profiler is.
> >
> > Yes, I'm glad you pushed me to do it.  Looking forward to the fix.
> The two secrets to writing fast code are:
> 1. using a profiler
> 2. looking at the assembler output of the compiler
> In my experience, programmers will go to astonishing lengths to avoid doing
> those two, and will correspondingly expend hundreds of hours "optimizing" and
> getting perplexing results.

I think you overestimate the amount of programmers that can read assembler
nowadays.  FWIW I only learned when I posted a bunch of stuff here about various
performance issues and you kept asking me to read the disassembly.  In hindsight
it was well worth it, though.  I think reading assembly language and understanding
the gist of how things work at that level is still an important skill for modern
programmers.  While writing assembly is notoriously hard (I've never even tried
for anything non-trivial), reading it is a heck of a lot easier to pick up.  I
went from zero to basically literate in a few evenings.


More information about the Digitalmars-d mailing list