On Tue, Dec 09, 2014 at 07:16:56PM +0300, Dmitry Olshansky via Digitalmars-d wrote: > 08-Dec-2014 18:18, H. S. Teoh via Digitalmars-d пишет: > >On Mon, Dec 08, 2014 at 08:33:16AM +0000, Russel Winder via Digitalmars-d > >wrote: > >[...] > >>As with any of these situation the convoluted hardcoded for a > >>specific processor code, especially assembly language will always > >>win. I don't care about that, I care about the fastest > >>comprehensible code that is portable simply by compilation or > >>execution. Based on this, Java does well, so does some Groovy > >>perhaps surprisingly, also Scala. C++ does well especially with TBB > >>(though as an API it leaves a lot to be desired). D is OK but only > >>using ldc2 or gdc, dmd sucks. > >[...] > > > >Yeah, I find in my own experience that gdc -O3 tends to produce code > >that's consistently ~20% faster than dmd -O, especially in > >compute-intensive code. > > And that's not nearly enough. Also both LDC & GDC often can't inline > many functions from phobos due to separate compilation. [...]
Really? Most of the Phobos function I use are templates, so inlining shouldn't be a problem, should it? Besides, gdc is far better at inlining that dmd ever was, though of course there are some constructs that the front-end doesn't inline, and the backend doesn't have enough info to do so. This is an area that should be improved. T -- Fact is stranger than fiction.
