Looking for more library optimization patterns

safety0ff via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Wed Jul 30 14:09:07 PDT 2014


On Thursday, 30 January 2014 at 18:36:09 UTC, bearophile wrote:
>
> A de-optimization I'd really like in LDC (and dmd) is to not 
> call the run-time functions when you perform a verctor 
> operation on arrays statically known to be very short:
>

I just learned about this issue while looking at 
http://rosettacode.org/wiki/Hamming_numbers#D
(Alternative version 2, opEquals)

It makes me sad to learn that slice / array operations get turned 
into monstrosities by the compiler.
There are some huge wins to be had in this area.


More information about the digitalmars-d-ldc mailing list