What is the compilation model of D?
Jonathan M Davis
jmdavisProg at gmx.com
Wed Jul 25 09:33:51 PDT 2012
On Wednesday, July 25, 2012 14:57:23 Andrej Mitrovic wrote:
> Hell I can't believe how outdated the compiler technology is. I can
> play incredibly realistic and interactive 3D games in real-time with
> practically no input lag, but I have to wait a dozen seconds for a
> tool to convert lines of text into object code? From a syntax
> perspective D has moved forward but from a compilation perspective it
> hasn't innovated at all.
And dmc and dmd are lightning fast in comparison to most compilers. I think
that a lot of it comes down to the fact that optimizing code is _expensive_,
and doing a lot of operations on an AST isn't necessarily all that cheap
either. dmd is actually _lightning_ fast at processing text. That's not what's
slow. It's everything which is after that which is.
And for most compilers, the speed of the resultant code matters a lot more
than the speed of compilation. Compare this to games which need to maintain a
certain number of FPS. They optimize _everything_ towards that goal, which is
why they achieve it. There's also no compiler equivalent of parallelizing
optimizations to the AST or asm like games have parallelizing geometric
computations and the like with GPUs. The priorities are completely different,
what they're doing is very different, and what they have to work with is very
different. As great as it would be if compilers were faster, it's an apples to
oranges comparison.
- Jonathan M Davis
More information about the Digitalmars-d
mailing list