[Interest] armv7a-hard-float in Qt android apps

Ola Røer Thorsen ola at silentwings.no
Fri Apr 29 18:30:27 CEST 2016


2016-04-29 16:36 GMT+02:00 Jean-Michaël Celerier <
jeanmichael.celerier at gmail.com>:

>
> On Fri, Apr 29, 2016 at 1:55 PM, Ola Røer Thorsen <ola at silentwings.no>
> wrote:
>
>>
>> float a = 1.0f;
>> float b = 2.0*a; // BAD!
>> float b = 2.0f*a; // Good!
>>
>
> Pretty sure that this would be a non-problem starting at -O1 optimization
> level.
>

Well you're wrong. If you multiply with a double precision constant value
(2.0), the multiplication is done in double precision and the result is
then converted to single precision, regardless of the optimize level. This
makes a big difference on hardware that only support single-precision in
hardware (I know this from experience, not assumptions).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20160429/89032253/attachment.html>


More information about the Interest mailing list