On Tuesday, 22 November 2016 at 16:07:39 UTC, Steven
Schveighoffer wrote:
On 11/22/16 8:31 AM, Ilya Yaroshenko wrote:
Philosophical Questions:
1. Why hight level stuff like BitRange is in core.bitop, but
not in
std.bitmanip? If it should be in core, why it is public?
I wrote BitRange to help with cycle detection. It was related
to using the btc/btr/bt functions on bit arrays (it's meant to
wrap such a bit array), so that seemed like a natural place for
it. Putting it in std.bitmanip would make it unavailable to
druntime.
Why shouldn't it be public?
2. Why bsf and bsr do NOT use hardware instructions anymore?
They should unless there is no hardware instruction available.
I believe the software implementation is only a fallback when
this is the case.
-Steve
They are always software
https://github.com/dlang/druntime/blob/master/src/core/bitop.d
--Ilya