Performance dmd vs ldc2

Chris wendlec at tcd.ie
Thu Aug 1 02:59:58 PDT 2013


On Wednesday, 31 July 2013 at 18:44:14 UTC, Kagamin wrote:
> Another possibility is to copy the xml.d, remove the module 
> std.xml; declartion from it, change import std.xml; to import 
> xml; then compile with dmd and ldc. This will account for 
> differences in compiler flags used to compile phobos in dmd and 
> ldc projects.

Did just this. The result is that both versions perform worse.

--- Repeat x1 ---
dmd -release -noboundscheck -O -inline
Average time: 80 msecs

lcd2
Average time: 2 msecs

--- Repeat x100 ---
dmd -release -noboundscheck -O -inline
Average time: 78.84 msecs

ldc2
Average time: 0.08 msecs

asm of dmd = 48,620 lines
asm of lcd2 = 15,524 lines

I can send the code to anyone who would like to test it.



More information about the digitalmars-d-ldc mailing list