> Le 22 mars 2023 à 20:48, Oleg Nesterov <o...@redhat.com> a écrit :
> 
> On 03/22, Oleg Nesterov wrote:
>> 
>> Speaking of compiler options...
> 
> another question ;)
> 
> Can't we have a compiler option to set gGlobal->gNeedManualPow = false for
> C/C++ backends?
> 
> I do not think mydsp_faustpowerXXX() generated by faust can buy something,
> I think that modern compilers can handle pow(float, int) just fine.
> 
> For example,
> 
>       double pow10(double f)
>       {
>           return pow(f, 10);
>       }
> 
> compiles to
> 
>       pow10(double):
>               movapd  xmm1, xmm0
>               mulsd   xmm0, xmm0
>               mulsd   xmm0, xmm0
>               mulsd   xmm0, xmm1
>               mulsd   xmm0, xmm0
>               ret
> 
> with gcc/clang -Ofast.
> 
> And can't resist, to me these faustpowerXXX() helpers look simply annoying in
> the generates C++ code although this doesn't matter.
> 
> Oleg.
> 

Makes sense with recent compilers. So gNeedManualPow set to false in C, C++ 
LLVM backends:
https://github.com/grame-cncm/faust/commit/7d5c17d9d1b0417775e59c28d5c1d0360fae1455

Stéphane 



_______________________________________________
Faudiostream-devel mailing list
Faudiostream-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/faudiostream-devel

Reply via email to