Boost logo

Boost :

Subject: Re: [boost] [gsoc] boost.simd news from the front.
From: MaximYanchenko (MaximYanchenko_at_[hidden])
Date: 2011-06-12 05:42:51


Hi David,

> What's the difference between:
> ADDPD XMM0, XMM1
> and
> XMM0 = __builtin_ia32_addpd (XMM0, XMM1)
> I would contend nothing, from a programming effort perpective.
 
If you compare how GCC handles this, you'll see that using any of asm inside a
loop disables virtually any optimization (like loop unrolling). Even if you use
automatic register allocation in the asm block.
If you rewrite the same using builtins (almost 1-to-1), the optimization is back.

Thanks,
Maxim


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