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