Ignore:
Timestamp:
Nov 12, 2007, 12:00:29 AM (18 years ago)
Author:
oliver
Message:

Add special fastZeroedMalloc function to replace a
number of fastCalloc calls where one argument was 1.

Reviewed by Darin.

This results in a 0.4% progression in SunSpider, more
than making up for the earlier regression caused by
additional overflow checks.

File:
1 edited

Legend:

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

    r27678 r27711  
    510510#endif
    511511
    512     m_u.table = static_cast<Table*>(fastCalloc(1, Table::allocationSize(newTableSize)));
     512    m_u.table = static_cast<Table*>(fastZeroedMalloc(Table::allocationSize(newTableSize)));
    513513    m_u.table->size = newTableSize;
    514514    m_u.table->sizeMask = newTableSize - 1;
     
    535535    Table* oldTable = m_u.table;
    536536   
    537     m_u.table = static_cast<Table*>(fastCalloc(1, Table::allocationSize(newTableSize)));
     537    m_u.table = static_cast<Table*>(fastZeroedMalloc(Table::allocationSize(newTableSize)));
    538538    m_u.table->size = newTableSize;
    539539    m_u.table->sizeMask = newTableSize - 1;
Note: See TracChangeset for help on using the changeset viewer.