Changeset 20330 in webkit for trunk/JavaScriptCore/kjs


Ignore:
Timestamp:
Mar 19, 2007, 4:50:43 PM (18 years ago)
Author:
darin
Message:

Reviewed by Geoff.

  • Changed list size threshold to 5 based on testing.

I was testing the i-Bench JavaScript with the list statistics
dumping on, and discovered that there were many 5-element lists.
The fast case for lists was for 4 elements and fewer. By changing
the threshold to 5 elements we get a measurable speedup. I believe
this will help real web pages too, not just the benchmark.

  • kjs/list.cpp: Change constant from 4 to 5.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/list.cpp

    r20004 r20330  
    11/*
    2  *  This file is part of the KDE libraries
    3  *  Copyright (C) 2003 Apple Computer, Inc.
     2 *  Copyright (C) 2003, 2004, 2005, 2006, 2007 Apple Inc. All rights reserved.
    43 *
    54 *  This library is free software; you can redistribute it and/or
     
    3433// tunable parameters
    3534const int poolSize = 512;
    36 const int inlineValuesSize = 4;
     35const int inlineValuesSize = 5;
    3736
    3837enum ListImpState { unusedInPool = 0, usedInPool, usedOnHeap, immortal };
Note: See TracChangeset for help on using the changeset viewer.