Bug 203550

Summary: [JSC] DateMath should have TimeClipped version
Product: WebKit Reporter: Yusuke Suzuki <ysuzuki>
Component: JavaScriptCoreAssignee: Yusuke Suzuki <ysuzuki>
Status: RESOLVED FIXED    
Severity: Normal CC: benjamin, cdumez, cmarcelo, dbates, ews-watchlist, keith_miller, mark.lam, msaboff, saam, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Bug Depends on: 202187    
Bug Blocks:    
Attachments:
Description Flags
Patch
none
Patch
none
Patch
none
Patch saam: review+

Yusuke Suzuki
Reported 2019-10-28 21:10:51 PDT
ECMAScript uses milliseconds (double) as its internal representation, but Date constructor and its operation clips this double before actually using it. As a result, this milliseconds is always within 53bit, and it is always integer. This means that we should use int64_t when calculating GregorianDateTime. When running instruments profiler, 31% of time is consumed by `fmod`. This is really fun, we should use integers instead.
Attachments
Patch (32.47 KB, patch)
2019-10-29 18:34 PDT, Yusuke Suzuki
no flags
Patch (34.99 KB, patch)
2019-10-29 20:02 PDT, Yusuke Suzuki
no flags
Patch (34.33 KB, patch)
2019-10-29 20:09 PDT, Yusuke Suzuki
no flags
Patch (32.54 KB, patch)
2019-10-30 19:32 PDT, Yusuke Suzuki
saam: review+
Radar WebKit Bug Importer
Comment 1 2019-10-29 16:48:01 PDT
Yusuke Suzuki
Comment 2 2019-10-29 18:34:50 PDT
Yusuke Suzuki
Comment 3 2019-10-29 20:02:34 PDT
Yusuke Suzuki
Comment 4 2019-10-29 20:09:47 PDT
Yusuke Suzuki
Comment 5 2019-10-30 19:32:11 PDT
Yusuke Suzuki
Comment 6 2019-10-31 09:14:09 PDT
Note You need to log in before you can comment on or make changes to this bug.