Boost logo

Boost :

Subject: Re: [boost] interest in structure of arrays container?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2016-10-21 04:01:19


On 10/21/2016 01:39 AM, Larry Evans wrote:
> On 10/21/2016 01:07 AM, Michael Marcin wrote:
>> On 10/21/2016 12:48 AM, Michael Marcin wrote:
>>> On 10/20/2016 10:02 PM, Larry Evans wrote:
>>>>
>>>> The modification added soa_emitter_block_t which uses soa_block.
>>>> Unfortunately, this soa_emitter_block_t takes about twice as long as
>>>> your soa_emitter_static_t.
>>>>
>>>> I've no idea why. Any guesses?
>>>>
>>>
>>> 2x is quite an abstraction penalty.
>>> I can only assume your compiler is failing to optimize away some part of
>>> the abstraction.
>
> OOPS. Yeah, I forgot about run-time optimization compiler flags :(
>
[snip]
Using optimization flag, -O2, (and maybe soa_block.begin_all) makes
soa_block fastest, as described here:

   https://github.com/cppljevans/soa/blob/master/codepad.eol6auRN.cpp#L47

:)


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