[Webkit-unassigned] [Bug 16537] Make date code faster by removing redundant calls

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 20 11:57:49 PST 2007


http://bugs.webkit.org/show_bug.cgi?id=16537





------- Comment #12 from eric at webkit.org  2007-12-20 11:57 PDT -------
Created an attachment (id=18012)
 --> (http://bugs.webkit.org/attachment.cgi?id=18012&action=view)
2007-12-20  Eric Seidel  <eric at webkit.org>


        Reviewed by Geoff.

        Small reworking of Date code for 4% speedup on Date tests (0.2%
overall)
        http://bugs.webkit.org/show_bug.cgi?id=16537

        Make msToYear human-readable
        Make msToDayInMonth slightly more readable and avoid recalculating
msToYear
        Remove use of isInLeapYear to avoid calling msToYear
        Remove dayInYear call by changing msToDayInMonth to
dayInMonthFromDayInYear
        Remove more duplicate calls to dayInYear and getUTCOffset for further
speedup

        * kjs/DateMath.cpp:
        (KJS::daysFrom1970ToYear):
        (KJS::msToYear):
        (KJS::monthFromDayInYear):
        (KJS::checkMonth):
        (KJS::dayInMonthFromDayInYear):
        (KJS::dateToDayInYear):
        (KJS::getDSTOffsetSimple):
        (KJS::getDSTOffset):
        (KJS::gregorianDateTimeToMS):
        (KJS::msToGregorianDateTime):
---
 JavaScriptCore/ChangeLog        |   25 +++++++
 JavaScriptCore/kjs/DateMath.cpp |  146 ++++++++++++++++++++-------------------
 2 files changed, 99 insertions(+), 72 deletions(-)


-- 
Configure bugmail: http://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.



More information about the webkit-unassigned mailing list