Inlining problem of core.bitops

John Colvin via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Oct 20 02:12:27 PDT 2015


On Tuesday, 20 October 2015 at 07:15:52 UTC, Marco Leise wrote:
> Am Sat, 28 Dec 2013 17:04:09 +0000
> schrieb "bearophile" <bearophileHUGS at lycos.com>:
>
>> David Nadlinger:
>> 
>> > https://github.com/ldc-developers/ldc/issues/561
>> 
>> Given the intensity Manu wants this feature, I think this 
>> needs to be discussed in the main D newsgroup, to bring a 
>> @alwaysinline or @forceinline as D standard. The differences 
>> between D compilers should be minimized.
>> 
>> Bye,
>> bearophile
>
> Funny enough, when working on fast.json I had to avoid bsr(),
> too because of missed inlining. (It is a common need for
> emulated floating point calculations.)

If you copy the definition of bsr from ldc's druntime to the 
current module then ldc will inline it. Ugly but effective.


More information about the digitalmars-d-ldc mailing list