[Webkit-unassigned] [Bug 98913] Change transformation precision from double to float

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Oct 15 08:54:56 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=98913





--- Comment #13 from Gabor Rapcsanyi <rgabor at webkit.org>  2012-10-15 08:55:43 PST ---
(In reply to comment #11)
> I strongly suggest against a typedef.
> 
> We've made this mistake in Qt, we introduced a "qreal" type that was typedef'ed to double on "desktop" platforms and "float" on "embedded"/"mobile" platforms (ARM based mostly). I'm saying it was a mistake because the introduced inconsistency brought in many issues.
> 
> We've had a thread on the Qt development mailing list a while ago about trying to get rid of the typedef. The thread starts here:
> 
> http://lists.qt-project.org/pipermail/development/2012-February/002015.html

Ok, I've read this thread and now I see 2 solutions, (a) is to make template classes as somebody suggested on the Qt mailing list and (b) is that change everything to floats in transformations.

I think the first thing what we should discuss is where we really need the double precision. So if there is a part of WebKit which really needs this extra precision then we shouldn't chose (b).

The other thing is that your system APIs (Darin said OS X as well) using doubles so the conversions may take the time save of floats.
Memory usage is another important thing and I would like to do some measures to see the benefit of floats.

I uploaded a test (transform.html) which I wrote to see the performance gain of floats. It's using css transformations on small rectangles. The bottleneck was of course the matrix multiplication in transformations, but unfortunately I didn't see any performance differences between the doubles or floats. 

I want to do some memory measurements as well. I hope I would see more differences there.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.


More information about the webkit-unassigned mailing list