Ignore:
Timestamp:
Nov 9, 2009, 7:14:26 PM (16 years ago)
Author:
[email protected]
Message:

Added a tiny cache for Date parsing.

Reviewed by Sam "Home Wrecker" Weinig.

SunSpider says 1.2% faster.

  • runtime/DateConversion.cpp:

(JSC::parseDate): Try to reuse the last parsed Date, if present.

  • runtime/JSGlobalData.cpp:

(JSC::JSGlobalData::resetDateCache):

  • runtime/JSGlobalData.h: Added storage for last parsed Date. Refactored

this code to make resetting the date cache easier.

  • runtime/JSGlobalObject.h:

(JSC::DynamicGlobalObjectScope::DynamicGlobalObjectScope): Updated for
refactoring.

  • wtf/DateMath.cpp:

(JSC::parseDateFromNullTerminatedCharacters):

  • wtf/DateMath.h: Changed ExecState to be first parameter, as is the JSC custom.
File:
1 edited

Legend:

Unmodified
Added
Removed
Note: See TracChangeset for help on using the changeset viewer.