Regarding the proposed Binray Literals Deprecation

Patrick Schluter Patrick.Schluter at bbox.fr
Wed Sep 14 13:55:34 UTC 2022


On Wednesday, 14 September 2022 at 12:36:09 UTC, Ali Çehreli 
wrote:
> On 9/14/22 01:43, Patrick Schluter wrote:
>
> > `core.bitop.popcnt(check) == 4` would be simpler and most
> modern CPU's
> > have an instruction for that.
>
> That will give total number of bits set. Steve's function 
> determines whether 5 neighboring bits are set consecutively, 
> anywhere in the "register".

ok. My bad.

>
> And that 4 is a red herring that made me think I found a bug. 
> No, the function finds 5 consecutive bits set by 4 shifts. :)
>





More information about the Digitalmars-d mailing list