Why is D slower than LuaJIT?

Andreas Mayer spam at bacon.eggs
Wed Dec 22 15:52:25 PST 2010


Walter Bright Wrote:

> I notice you are using doubles in D. dmd currently uses the x87 to evaluate 
> doubles, and on some processors the x87 is slow relative to using the XMM 
> instructions. Also, dmd's back end doesn't align the doubles on 16 byte 
> boundaries, which can also slow down the floating point on some processors.

Using long instead of double, it is still slower than LuaJIT (223 ms on my machine).
Even with int it still takes 101 ms and is at least 3x slower than LuaJIT.

> Both of these code gen issues with dmd are well known, and I'd like to solve 
> them after we address higher priority issues.
> 
> If it's not clear, I'd like to emphasize that these are compiler issues, not D 
> language issues.

I shouldn't use D now? How long until it is ready?


More information about the Digitalmars-d mailing list