On 16 July 2014 15:14, Daniel Murphy via Digitalmars-d
<[email protected]> wrote:
> "Johannes Pfau"  wrote in message news:[email protected]...
>
>
>> > The problem is not 'this feature is too complex', the problems is
>> > that it's more complex than necessary.
>>
>> So what's necessary in this specific case?
>
>
> Use intrinsics with a nice template wrapper.  They get inlined, the unused
> function bodies get stripped, and the debug info/typeinfo is just as big a
> problem as it is for every other function in your program.
>
> Intrinsics get us away from our current 'there is no portable way to do
> this' situation.

No they don't.  Intrinsics make things worse.

> They are _trivial_ to implement for any of the compilers.

No they aren't, unless you are talking specifically about volatile.,
in which case, that depends...

> I have complete faith that it is possible to make a performant wrapper for
> both the single-register read/write and the struct pattern you posted.  And
> if I'm wrong - we can add a volatile type modifier later!
>
> I just don't see volatile pulling it's weight.

Hardware access is supposed to be correct, not performant.

Regards
Iain

Reply via email to