[Webkit-unassigned] [Bug 104376] New: Remove unnecessary float casts in transformations
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Fri Dec 7 09:48:37 PST 2012
https://bugs.webkit.org/show_bug.cgi?id=104376
Summary: Remove unnecessary float casts in transformations
Product: WebKit
Version: 528+ (Nightly build)
Platform: All
OS/Version: All
Status: NEW
Severity: Normal
Priority: P2
Component: WebCore Misc.
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bfulgham at webkit.org
I recently noticed a number of float casts in the transformation classes. These are likely vestiges from the time with TransformationMatrix.cpp used all float values internally. This bug cleans up these unnecessary casts to help clarify the meaning of the code. It may provide a slight performance benefit, as the cast operations on variables requires a couple of additional instructions to convert the data types. Consider the following two cases, one with the cast in place and the other without:
mat.m_matrix[1][1] = (float)cosTheta;
5D409F05 fld qword ptr [cosTheta]
5D409F08 fstp dword ptr [ebp-0B0h]
5D409F0E fld dword ptr [ebp-0B0h]
5D409F14 fstp qword ptr [ebp-78h]
mat.m_matrix[1][2] = sinTheta;
5D409F17 fld qword ptr [sinTheta]
5D409F1A fstp qword ptr [ebp-70h]
The double-to-double store is done in two instructions, rather than the four required for the casting case.
--
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