|
Boost : |
Subject: Re: [boost] interest in structure of arrays container?
From: Michael Marcin (mike.marcin_at_[hidden])
Date: 2016-10-25 23:13:02
On 10/25/2016 12:22 PM, Larry Evans wrote:
>
> Hmmm. I didn't realize you'd have to run the benchmark
> several times to get stable results. I guess that reflect
> my ignorance of how benchmarks should be run.
The code was just a quick example hacked up to show large difference
between different techniques.
If you want to compare similar techniques you'll need a more robust
benchmark.
It would be easy to convert it to use:
https://github.com/google/benchmark
Which is quite good.
>
> Could you explain how running a couple of times achieves
> stable results (actually, on some occassions, I've run the
> benchmark and got results completely unexpected, I suspect
> it was because some application deamon was stealing cycles
> from the benchmark, leading to the unexpedted results).
>
>> Interestingly your SSE code is ~13% faster than the
>> LibFlatArray code for large particle counts.
>
> Actually, the SSE code was the OP's.
>
Actually it originates from:
https://software.intel.com/en-us/articles/creating-a-particle-system-with-streaming-simd-extensions
>
> From the above, the LibFlatArray and SSE methods are the
> fastest. I'd guess that a new "SoA block SSE" method, which
> uses the _mm_* methods, would narrow the difference. I'll
> try to figure out how to do that. I notice:
>
> #include <mmintrin.h>
>
> doesn't produce a compile error; however, that #include
> doesn't have the _mm_add_ps used here:
>
> https://github.com/cppljevans/soa/blob/master/soa_compare.benchmark.cpp#L621
>
>
> Do you know of some package I could install on my ubuntu OS
> that makes those SSE functions, such as _mm_add_ps,
> available?
>
> [snip]
If you're using gcc I think the header <xmmintrin.h>
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk