New primitive types?
Florian Weimer
fw at deneb.enyo.de
Sat Aug 19 08:34:56 UTC 2017
* Michal Terepeta:
> On Tue, Aug 1, 2017 at 8:08 PM Carter Schonwald <carter.schonwald at 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).
More information about the ghc-devs
mailing list