Bug 16583 - Speedup date code (msToGregorianDateTime) by only handling positive values
Summary: Speedup date code (msToGregorianDateTime) by only handling positive values
Status: RESOLVED WONTFIX
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.4
: P2 Normal
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-12-23 01:52 PST by Eric Seidel (no email)
Modified: 2012-09-07 12:35 PDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2007-12-23 01:52:28 PST
Speedup date code (msToGregorianDateTime) by only handling positive values

msToGregorianDateTime and the associated static inline support functions are slow due to needing to handle negative values for ms.  Instead we should detect that ms is negative, flip the sign, send it through normal processing and then flip the signs on the resulting GregorianDateTime.  This would add a branch, but would greatly speed up date processing due to the removal of all of the floor() calls.
Comment 1 Gavin Barraclough 2012-09-07 12:35:48 PDT
flipping the sign would not in itself allow us to remove calls to floor.  Our date math has changed a lot in the last 4 years, I don't think this bug is still tracking active optimization effort.