Ignore:
Timestamp:
Sep 20, 2009, 10:42:24 PM (16 years ago)
Author:
[email protected]
Message:

SNES is too slow
https://bugs.webkit.org/show_bug.cgi?id=29534

Reviewed by Maciej Stachowiak.

The problem was that the emulator used multiple classes with
more properties than our dictionary cutoff allowed, this resulted
in more or less all critical logic inside the emulator requiring
uncached property access.

Rather than simply bumping the dictionary cutoff, this patch
recognises that there are two ways to create a "dictionary"
structure. Either by adding a large number of properties, or
by removing a property. In the case of adding properties we
know all the existing properties will maintain their existing
offsets, so we could cache access to those properties, if we
know they won't be removed.

To make this possible, this patch adds the logic required to
distinguish a dictionary created by addition from one created
by removal. With this logic in place we can now cache access
to objects with large numbers of properties.

SNES performance improved by more than 6x.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/JSObject.cpp

    r48542 r48573  
    472472{
    473473    size_t offset;
    474     if (m_structure->isDictionary()) {
     474    if (m_structure->isUncacheableDictionary()) {
    475475        offset = m_structure->removePropertyWithoutTransition(propertyName);
    476476        if (offset != WTF::notFound)
Note: See TracChangeset for help on using the changeset viewer.