D to ASM.js vs D to Dart (VM)

Dicebot via Digitalmars-d digitalmars-d at puremagic.com
Mon May 19 11:05:27 PDT 2014


On Sunday, 18 May 2014 at 08:02:59 UTC, bearophile wrote:
> deadalnix:
>
>> If the machine code is the same, the function can be merged by 
>> the optimizer.
>
> But in general isn't it more efficient to not generate bloat 
> instead of generating it, detecting it, and removing it?
>
> Bye,
> bearophile

It is much more difficult task I believe as template bodies can 
change dramatically even from a slightest change in parameter 
types. Compiler needs to prove instance equivalence in some way 
to do this which sounds harder than just comparing result 
assembly.


More information about the Digitalmars-d mailing list