Am 19.01.2014 22:50 schrieb "Nikolay Nikolov" :
>
> On 01/19/2014 10:45 PM, Sven Barth wrote:
>>> Can the compiler optimise this operation choosing the fastest one -
>>> probably depending on the architecture x86, arm, aso.
>>
>>
>> It can if someone codes support for it (maybe some code generators
On 01/19/2014 09:45 PM, Sven Barth wrote:
Can't really comment on floats, but for integers the fasted to
multiply by 2 should be a shift left.
GCC automatically optimizes this. With the small "embedded" CPUs I
usually use, it even converts more most multiplications and divisions
with constant
Sven Barth wrote:
Can the compiler optimise this operation choosing the fastest one -
probably depending on the architecture x86, arm, aso.
It can if someone codes support for it (maybe some code generators
already have such simplifications). I thought I've at least seen such
code for intege