25 Jan
2015
25 Jan
'15
5:03 p.m.
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.