[Webkit-unassigned] [Bug 133916] Implement DOMPoint/DOMPointReadOnly

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Sun Jun 15 17:10:08 PDT 2014


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


Benjamin Poulain <benjamin at webkit.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |fpizlo at apple.com,
                   |                            |oliver at apple.com




--- Comment #5 from Benjamin Poulain <benjamin at webkit.org>  2014-06-15 17:10:24 PST ---
(In reply to comment #4)
> (In reply to comment #3)
> > (From update of attachment 233124 [details] [details])
> > I am strongly against this. The binding overhead is an order of magnitude larger than the cost of the operations.
> > 
> > With FTL, the compiler has huge opportunities for inlining and vectorizing this kind of operations. Denying this would be shooting ourself in the foot with our biggest gun.
> 
> Thanks. I uploaded the patch to get more feedback. I need some guidance for this work. Is there an example that I can use? Also, I did not implement matrixTransform() which requires a 4x4 matrix multiplication. DOMMatrix requires many more 2x3 and 4x4 operations. Would I need to reimplement TransformationMatrix?

It is probably ask Filip for advices on how to design this correctly.

The DOMPoint and DOMMatrix seems quite similar to Float64Array in that we want a continuous buffer of memory (ideally aligned to 16 bytes) that should be addressed very efficiently from JavaScript. Filip iterated a lot over the typed array so I am sure he will have plenty of insights about making this great.

Regarding transformation by a matrix, the overhead of that operation is large enough that we can afford a function call. TransformationMatrix has hand written assembly to do that fast, the only requirement is that the buffer is aligned to 16 bytes. This code can be moved to JSC or WTF if needed. We can also relax the alignment constraints but that would be unfortunate.

For simpler operations (matrix scale, translate, etc), I believe built-ins will give the best performance.

-- 
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