Why is D slower than LuaJIT?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Thu Dec 23 06:12:50 PST 2010


On 12/23/10 2:52 AM, bearophile wrote:
> Andrei:
>
>> I'm thinking what to do about iota, which has good features but exacts
>> too much cost on tight loop performance. One solution would be to define
>> iota to be the simple, forward range that I defined as Iota2 in my
>> previous post. Then, we need a different name for the full-fledged iota
>> (random-access, has known length, iterates through the same numbers
>> forward and backward etc). Ideas?
>
> Is improving the compiler instead an option?

It's more of a separate matter than an option. Iota currently does a 
fair amount of work for floating-point types, and a contemporary 
optimizer cannot be reasonably expected to simplify that code.

Andrei



More information about the Digitalmars-d mailing list