Scorn: >But D as a system-programming language with the ambition to be an alternative >to C / C++ has, at least in the long term, to compete with C / C++ regarding >these things.<
I understand. The problem is that D is a new language with new compilers, so it can't optimize as well as GCC that is compiling C code for so many years. LDC compiles C-like D1 code well enough, about as well as GCC or better. >And please make a collection of all the issues you have found so far and but >them on a web page somewhere.< http://www.fantascienza.net/leonardo/js/slow_d.zip >Which compiler switches do you need for this ?< Found after few hours of tests of mine plus a suggestion from the LLVM lead developer :-) For example you have a "temp.d" main module and a "mo.d" imported module: ldc -O5 -release -inline -output-bc temp.d ldc -O5 -release -inline -output-bc mo.d opt -std-compile-opts temp.bc > tempo.bc opt -std-compile-opts mo.bc > moo.bc llvm-ld -L/usr/lib/d -native -ltango-ldc -ldl -lm -lpthread -internalize-public-api-list=_Dmain -o=tempo tempo.bc moo.bc >But the whole thing is easy solvable by not doing just a separate compilation >of the modules and then linking them together< If you take a look at my precedent post ( http://www.digitalmars.com/webnews/newsgroups.php?art_group=digitalmars.D.learn&article_id=18822 ) you can see I have found DMD does inline functions from other modules (while LDC doesn't do it, so I have to report this to the ldc devs and not to Walter). Bye, bearophile
