Walter Bright:

>dmd inlines delegates to templates when they are passed as alias parameters.<

A functional language (Scala is partially a functional language) uses functions 
everywhere, so inlining of closures is a desired optimization feature.


>I know you're a fan of LLVM,<

With some work LLVM can be used to JIT-compile the D compile-time functions, so 
they can probably run quite faster.

With some more work you can also keep some parts of LLVM around at runtime, to 
use the compiler as a library at runtime, as C#4 does.

Eventually with more work you can even perform some "lifetime" optimizations, 
as HotSpot does:
http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.announce&article_id=18420


>but it would be fair to provide examples when saying things like LLVM does a 
>better job on X.<

You are right, I am sorry. You can ask LDC developers why they have preferred 
the LLVM inliner instead of the D front-end one. Later I can ask to them.

Bye,
bearophile

Reply via email to