Boost logo

Boost :

Subject: Re: [boost] [Review] Boost.Endian mini-review
From: Peter Dimov (lists_at_[hidden])
Date: 2015-01-25 12:03:32


Beman Dawes wrote:

> 2) If the default is unaligned, unaligned types will get used
> inadvertently where aligned types could be used, and that can cause
> performance problems. Remember that the familiar <cstdint> types (e.g.
> int16_t, int32_t) are aligned types. It is natural to assume big_int32_t
> is an aligned type.

big_int32_t is not a buffer type though.

I don't know whether Olaf includes non-buffer types when he says:

>> I think the default / shortest name types should be unaligned, with
>> aligned access being explicit.

but I most certainly do not:

>>> Yes, a good argument against having aligned buffers at all, even though
>>> the docs do provide rationale for them. If you want aligned, use the
>>> non-buffer types.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk