[webkit-dev] Transformations precision: double -> float

Ryosuke Niwa rniwa at webkit.org
Mon May 21 10:37:07 PDT 2012


Maybe you can add a typedef in Platform.h to make it configurable? e.g.
maybe you want to be able to use long double instead of regular double in
the future.

- Ryosuke

On Mon, May 21, 2012 at 10:34 AM, Simon Fraser <simon.fraser at apple.com>wrote:

> TransformationMatrix started out as floats, then got changed to doubles in
> <http://trac.webkit.org/changeset/40761>
>
> This was done because on most hardware there is no penalty for using
> doubles over floats, and provided a better match with our system APIs that
> used doubles.
>
> I'd prefer to take a forward-looking stance here, and assume that in time
> hardware will catch up.
>
> Simon
>
> On May 21, 2012, at 4:04 AM, Zoltan Herczeg wrote:
>
> > Hi,
> >
> > is there any reason why the transformations in WebKit use doubles? We
> > could optimize some functions further with ARM SIMD if they would be
> > floats. Is there any objection to make them float if the change would
> have
> > no other side effects except some rounding because of the lower
> precision?
> >
> > Regards,
> > Zoltan
> >
> >
> > _______________________________________________
> > webkit-dev mailing list
> > webkit-dev at lists.webkit.org
> > http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.webkit.org/pipermail/webkit-dev/attachments/20120521/9c036fc8/attachment.html>


More information about the webkit-dev mailing list