Inlining problem of core.bitops

Marco Leise via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Oct 20 06:28:30 PDT 2015


Am Tue, 20 Oct 2015 09:13:43 +0000
schrieb John Colvin <john.loughran.colvin at gmail.com>:

> > If you copy the definition of bsr from ldc's druntime to the 
> > current module then ldc will inline it. Ugly but effective.
> 
> I also noticed better optimisations if I made bsr return a uint 
> instead of an int.

Ah you see I got clz with ubyte return but missed bsr and bsf.
Thanks for the reminder.

-- 
Marco



More information about the digitalmars-d-ldc mailing list