<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"></head><body><div>Atomic operations, or the lack thereof, don't seem terribly relevant to immutable Haskell constructor fields.</div><div><br></div><div><br></div><div><br></div><div id="composer_signature"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><div style="font-size:85%;color:#575757">David Feuer</div><div style="font-size:85%;color:#575757">Well-Typed, LLP</div></div><div><br></div><div style="font-size:100%;color:#000000"><!-- originalMessage --><div>-------- Original message --------</div><div>From: Carter Schonwald <carter.schonwald@gmail.com> </div><div>Date: 8/26/17  10:56 PM  (GMT-05:00) </div><div>To: Florian Weimer <fw@deneb.enyo.de>, Michal Terepeta <michal.terepeta@gmail.com> </div><div>Cc: ghc-devs <ghc-devs@haskell.org> </div><div>Subject: Re: New primitive types? </div><div><br></div></div>Which architectures are which?<br><br>I assume you mean the dec alpha allowed atomic operations on bytes... but<br>your phrasing is a teeny bit unclear<br><br>On Sat, Aug 19, 2017 at 4:34 AM Florian Weimer <fw@deneb.enyo.de> wrote:<br><br>> * Michal Terepeta:<br>><br>> > On Tue, Aug 1, 2017 at 8:08 PM Carter Schonwald <<br>> carter.schonwald@gmail.com><br>> > wrote:<br>> >> One issue with packed fields is that on many architectures you can't<br>> > quite do subword reads or<br>> >> writes.  So it might not always be a win.<br>> ><br>> > Could you give any examples?<br>><br>> Historic DEC Alpha, now long obsolete.<br>><br>> It is very hard to create compliant and performant implementations of<br>> Java 5, C 11 or C++ 11 on such architectures.  All these languages<br>> (and their subsequent revisions) require that naturally aligned<br>> objects can be accessed independently.  For example, you can't use a<br>> simple read-modify-write cycle to implement a single-byte store using<br>> word operations.<br>><br>> That's why such architectures really do not have a future (or even a<br>> present), except maybe in niche markets such as GPGPU (but even there,<br>> things are heading towards the de-facto standard memory model).<br>><br></body></html>