Bug 92518

Summary: use createUninitialized when creating TypedArray from another array
Product: WebKit Reporter: arno. <a.renevier>
Component: JavaScriptCoreAssignee: arno. <a.renevier>
Status: RESOLVED FIXED    
Severity: Normal CC: kbr, webkit.review.bot
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
patch proposal none

Description arno. 2012-07-27 11:08:01 PDT
Hi,
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.