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/wtf/HashTable.h

    r27710 r27711  
    827827        // gcc doesn't appear to support that
    828828        if (Traits::emptyValueIsZero)
    829             return static_cast<ValueType *>(fastCalloc(size, sizeof(ValueType)));
     829            return static_cast<ValueType *>(fastZeroedMalloc(size * sizeof(ValueType)));
    830830        ValueType* result = static_cast<ValueType*>(fastMalloc(size * sizeof(ValueType)));
    831831        for (int i = 0; i < size; i++)
Note: See TracChangeset for help on using the changeset viewer.