Bug 92518 - use createUninitialized when creating TypedArray from another array
Summary: use createUninitialized when creating TypedArray from another array
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: arno.
Depends on:
Reported: 2012-07-27 11:08 PDT by arno.
Modified: 2014-04-24 16:45 PDT (History)
2 users (show)

See Also:

patch proposal (20.75 KB, patch)
2012-07-27 12:08 PDT, arno.
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description arno. 2012-07-27 11:08:01 PDT
since bug #90838 has landed, we can make Typed Array construction still faster by using ::createUninitialized instead of ::create
Actually, we will fill the array before sending it, so it's safe to do so.
Comment 1 arno. 2012-07-27 12:08:11 PDT
Created attachment 155010 [details]
patch proposal

With this patch, performance test for construction with same typed array improves from 40ms to 25ms; construction from different typed array improves from 430ms to 270ms. construction from regular Array does not improve (and does not decrease)
Comment 2 Kenneth Russell 2012-07-27 14:32:58 PDT
Comment on attachment 155010 [details]
patch proposal

Arno: this looks fine, but would you please implement the same optimizations as in Bug 90838 and here for the V8 port? If not, would you please at least file a bug about doing so and CC me on it? r=me
Comment 3 WebKit Review Bot 2012-07-27 16:32:36 PDT
Comment on attachment 155010 [details]
patch proposal

Clearing flags on attachment: 155010

Committed r123935: <http://trac.webkit.org/changeset/123935>
Comment 4 WebKit Review Bot 2012-07-27 16:32:38 PDT
All reviewed patches have been landed.  Closing bug.
Comment 5 Darin Adler 2014-04-24 16:45:52 PDT
Moving all JavaScriptGlue bugs to JavaScriptCore. The JavaScriptGlue framework itself is long gone. And most of the more recent bugs put in this component were put there by people who thought this was for some other aspect of “JavaScript glue” and have nothing to do with the actual original reason for the existence of this component, which was an OS-X-only framework named JavaScriptGlue.