Bug 20983 - ArgumentsData should have some room to allocate some extra arguments inline
Summary: ArgumentsData should have some room to allocate some extra arguments inline
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Darin Adler
URL:
Keywords:
Depends on:
Blocks: 20813
  Show dependency treegraph
 
Reported: 2008-09-21 21:16 PDT by Cameron Zwarich (cpst)
Modified: 2008-09-22 21:56 PDT (History)
2 users (show)

See Also:


Attachments
patch (5.67 KB, patch)
2008-09-22 21:50 PDT, Darin Adler
zwarich: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Cameron Zwarich (cpst) 2008-09-21 21:16:12 PDT
Whenever there are extra arguments, we allocate memory for them in the constructor of the Arguments object and free them in the destructor. This is especially bad in any code that uses the Prototype framework (including the V8 Raytrace test). We should figure out a good number of arguments for which to reserve inline storage and eliminate this hit in the common case.

I am assigning this to myself.
Comment 1 Darin Adler 2008-09-22 13:51:31 PDT
Geoff is pretty sure that the common number of extra arguments is 2. So inline capacity for, say, 3, should be enough!

Geoff also pointed out that we could have a special case for when there are no declared parameters at all. I don't remember his specific ideas.
Comment 2 Darin Adler 2008-09-22 21:36:14 PDT
Cameron, sorry, I got impatient and did this one.
Comment 3 Darin Adler 2008-09-22 21:50:34 PDT
Created attachment 23693 [details]
patch
Comment 4 Cameron Zwarich (cpst) 2008-09-22 21:55:18 PDT
Comment on attachment 23693 [details]
patch

r=me, assuming it passes all tests
Comment 5 Darin Adler 2008-09-22 21:56:31 PDT
http://trac.webkit.org/changeset/36792