Why C++ compiles slowly

bearophile bearophileHUGS at lycos.com
Fri Aug 20 11:06:14 PDT 2010


Simen kjaeraas:
> But why? Could you not simply drop in and out of assembly and use
> D for flow-control and the like?

I don't know. I think that every time you drop in and out of assembly, unless your used naked assembly, the compiler adds some leading and trailing instructions.

In the biological and technological evolution most of the changes happen when a new "species" appear, then later the "species" are almost frozen, changes appear only very slowly. So for example you see many improvements in Java compared to many years of C/C++ evolution. This is part of the Punctuated Equilibria theory by S. J. Gould and others, and it's not specific of biological evolution, it's a property of dynamic systems that are in evolution.

Assembly and assemblers were born many years ago, and even if today we have invented many better ideas to software, those ideas are usually not applied to asm world.

The good thing of HLA is that it tries to break some of that tradition, and to bring a bit of innovation in the world of asm programming, and it does it well enough (despite the innovations it brings are probably mostly 30 years old, about as new as the original Pascal is; there are far more newer ideas that may be applied to asm programming. Some newer ideas can be seen in CorePy: http://www.corepy.org/ that allows to write computational kernels through Python code that are usually faster than D code).

This is why there are moments when I'd like a more modern asm inside D. I've written few hundred lines of asm code inside D programs, this is not a lot, it's just a bit of code, but for me it's a pain to write asm normally, and I can seen tens of ways to improve that work of mine :-)

Bye,
bearophile


More information about the Digitalmars-d mailing list