Subject: Re: [boost] [beast] Formal review
From: Peter Dimov (lists_at_[hidden])
Date: 2017-07-11 13:49:56
Phil Endecott wrote:
> > That hurts 32-bit ARM.
> I think that's an issue with whatever compiler you're using, not the
> architecture; I've just done a quick test with arm-linux-gnueabihf-g++-6
> 6.3.0 and I get about a 5% speedup by using memcpy.
No, it's an issue with ARM32 not allowing unaligned loads. The memcpy code,
at best, uses four byte loads, instead of one 32 bit one.
__builtin_assume_aligned doesn't help.
I suspect that all architectures that don't have unaligned loads will suffer
Myself, I'd go with the reinterpret_cast for the time being. It's indeed
_technically UB_, but it works.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk