[Bug 126] Add support for attribute to mark data as volatile.

via D.gnu d.gnu at puremagic.com
Sun Jun 15 04:32:27 PDT 2014


http://bugzilla.gdcproject.org/show_bug.cgi?id=126

--- Comment #19 from Mike <slavo5150 at yahoo.com> ---
Oh, and about atomic access... I agree that memory-mapped IO is shared, global
state, but I also agree that it is wasteful to wrap each and every access in
atomic accessors.  A large amount of memory mapped I/O is done during core,
peripheral, and board initialization, before any threads or interrupts are even
possible.  There is absolutely no need to wrap these in atomic accessors.  I
believe the only one capable of making the best decision about when and where
to add atomic access is the programmer, not the compiler.

The arguments that favor avoiding atomic access for the sake of performance and
codesize are not particularly strong, but nor are they weak.  I agree that
memory-mapped IO takes up a small percentage of most programs, but I don't
think that's an excuse to be careless and wasteful about efficiency.  These
micro-optimizations may not be significant on their own, but when taken in
aggregate they can give you a small edge in performance, codesize,
battery-life, cost, etc...  I don't want to compromise.  If I have to
compromise, D loses its appeal to me and I have less faith in the merits of my
own project.  That's very disheartening.  I want to be able to brag about my
work and about the usage of D in this domain, not make excuses.

-- 
You are receiving this mail because:
You are watching all bug changes.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/d.gnu/attachments/20140615/ad50dd57/attachment.html>


More information about the D.gnu mailing list