Do you think if statement as expression would be nice to have in D?

max haughton maxhaton at gmail.com
Tue Jun 7 22:22:22 UTC 2022


On Tuesday, 7 June 2022 at 21:48:10 UTC, Guillaume Piolat wrote:
> On Tuesday, 7 June 2022 at 21:09:08 UTC, Bruce Carneal wrote:
>>
>> 3) It's measurably (slightly) faster in many instances (it 
>> helps that I can shape the operand flows for this app)
>
> Depends on the loop, for example LLVM can vectorize llvm_sqrt
> https://d.godbolt.org/z/6xaTKnn9z
>
> but not llvm_exp / llvm_cos / llvm_sin / llvm_log
>
> https://d.godbolt.org/z/Pc34967vc
>
> for such loops I have to go __vector

Which instructions are they supposed to lower to? Wouldn't that 
require the intrinsic-in-name-only intel math library stuff?


More information about the Digitalmars-d mailing list