WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
Bug 24967
new Function is substantially slower than V8
https://bugs.webkit.org/show_bug.cgi?id=24967
Summary
new Function is substantially slower than V8
Oliver Hunt
Reported
2009-03-31 15:35:18 PDT
The linked site shows that performance of eval and new Function are dramatically slower (in the order of 2x slower) than eval and new Function in other browsers. We should investigate why this is the case.
Attachments
Add attachment
proposed patch, testcase, etc.
Oliver Hunt
Comment 1
2009-09-30 16:05:57 PDT
new Function (at least) results in a double parse -- eg. new Function(string) is considered function /*foo*/ (..) { string } which parses the function statement, but does not generate an AST for `string` as it is inside the function statement
Sam Weinig
Comment 2
2009-09-30 16:08:16 PDT
We could eagerly build the function, but we need to weigh the costs and benefits of doing so.
Gavin Barraclough
Comment 3
2012-09-07 12:46:32 PDT
Retested JSC performance for eval/new Function is 67/389, V8 performance is 82/84, Firefox performance is 71/456. We're faster than firefox, and only slower now on new Function. Updating title accordingly.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug