[More Info] Increasing speed of D applications to Intel C compiled applicaitons' standards
Sean Kelly
sean at f4.ca
Fri Nov 10 15:10:44 PST 2006
Dave wrote:
>
> Could it be that Intel is doing whole program optimization to inline
> things like memcpy and memset, during linkage (Are you using WPO? -- it
> may be the default, I can't remember)? I've found that for time critical
> code I can code my own (e.g.: memset) in D so the compiler can inline it
> and it will be faster. Perhaps those should be in Phobos instead of the
> C lib.?
I've been thinking about this as well. These functions are possibly a
bit much for intrinsics, but it would be fairly trivial to write them in
native D or even assembler--would have to inspect the resulting compiled
code to see which was better. The only problem offhand is that DMD does
not inline functions containing loops, nor does it inline functions
containing ASM blocks, so we'd probably be stuck with a function call
even with native D code.
Sean
More information about the Digitalmars-d
mailing list