Summary: | Named anonymous functions are slow accessing global variables | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Timothy Hatcher <timothy> | ||||
Component: | JavaScriptCore | Assignee: | Nobody <webkit-unassigned> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | ||||||
Priority: | P2 | ||||||
Version: | 528+ (Nightly build) | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Attachments: |
|
Description
Timothy Hatcher
2008-06-22 18:58:55 PDT
Created attachment 21876 [details]
Testcase
Can you give more data on the SquirrelFish regression: * Is access to a global from a named anonymous function slower in SF than it was before SF? * How big (%) is the regression? The cause of the relative slowness is that, according to the spec, a named anonymous function should have a vanilla (i.e. unoptimized) object inserted into its scope chain, with one property: the function's name. We can / should improve this situation, but that's how things are implemented today (and how they've always been implemented). It is not a regression, since SquirrelFish is faster than Safari 3.1. But there is now a difference in speed between named anonymous functions and non-named anonymous function that didn't exist in Safari 3.1. Committing to http://svn.webkit.org/repository/webkit/trunk ... M JavaScriptCore/ChangeLog M JavaScriptCore/GNUmakefile.am M JavaScriptCore/JavaScriptCore.pri M JavaScriptCore/JavaScriptCore.vcproj/JavaScriptCore/JavaScriptCore.vcproj M JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj M JavaScriptCore/VM/CodeGenerator.cpp M JavaScriptCore/VM/CodeGenerator.h M JavaScriptCore/kjs/AllInOneFile.cpp A JavaScriptCore/kjs/JSStaticScopeObject.cpp A JavaScriptCore/kjs/JSStaticScopeObject.h M JavaScriptCore/kjs/nodes.cpp M LayoutTests/ChangeLog M LayoutTests/fast/js/const-expected.txt M LayoutTests/fast/js/resources/const.js Committed r35368 |