[Webkit-unassigned] [Bug 156404] STP TypedArray.subarray 5x slowdown compared to 9.1

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Mon Apr 11 02:15:17 PDT 2016


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

--- Comment #5 from Arthur Langereis <puurtuur at me.com> ---
Created attachment 276133
  --> https://bugs.webkit.org/attachment.cgi?id=276133&action=review
Original Testcase

I added the original testcase as requested by Filip. I am fine with this being included in any repository.

The Pool subtest was an experiment to see if I pre-created empty TypedArrays and then initialised them when needed was to test where the bottleneck lies. In Webkit this is a bit faster than the subarray method but e.g. in Firefox it is essentially as fast as plain array filling (with a large up-front cost but that is fine in my case.)

Up to and including 9.1, Webkit is faster or comparable in all tests to Firefox and Chrome but now it is slower in most cases except for plain JS arrays.

For Keith: the reason I'm using subarray a lot is to have a sort-of C++-like array_view where I can give a function an object that can be sub-indexed. In my framework I create interleaved vertex/index buffers that are then indexed with views. I could reorganise this that I don't pass per-vector views but it made the interface a bit simpler.

Basically, I'm doing vertex stream building and manipulation in the browser and I naively assumed that array sub-view creation would be a very lightweight operation but after your comment I understand the overhead associated with it better now.

Thanks for your efforts.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20160411/b83cb8bc/attachment-0001.html>


More information about the webkit-unassigned mailing list