popcnt instruction

Rene Zwanenburg via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Tue Jun 24 10:27:08 PDT 2014


On Tuesday, 24 June 2014 at 17:05:24 UTC, Justin Whear wrote:
> On Tue, 24 Jun 2014 16:34:42 +0000, Archibald wrote:
>
>> Hello,
>> I need to use the "popcnt" processor instruction in a 
>> performance
>> critical section.
>> Is there a way to do this in D?
>
> D's inline assembler is described here: 
> http://dlang.org/iasm.html

There's also an intrinsic in core.bitop:
http://dlang.org/library/core/bitop/popcnt.html


More information about the Digitalmars-d-learn mailing list