Open philwhiteuk opened 1 year ago
Benchmarking date parsing on version 0.463.305 compared with version 0.505.347:
0.463.305
0.505.347
it("performs well", function () { this.timeout(4_000); const now = date(2023, 1, 1); const oneHundredYears = 365 * 100; for (let i = 0; i < oneHundredYears; i++) { const date = Days.add(now, i); const dateText = format(date, 'en-GB', { day: '2-digit', month: 'short', year: 'numeric' }); assert.deepEqual(parse(dateText, 'en-GB'), date); } });
@danielbodart I have run a javascript profiler on the date parse() method - comparison results here
parse()
Benchmarking date parsing on version
0.463.305
compared with version0.505.347
:0.463.305
took <2 secs0.505.347
took ~7.5 secs