Skip to content

Reference implementation has pathologically slow date difference case #3153

@ptomato

Description

@ptomato
const a = new Temporal.PlainDate(2025, 9, 19, 'gregory');
const b = new Temporal.PlainDate(275760, 1, 1, 'gregory');
a.until(b, { largestUnit: 'months' });

The above script takes >10 seconds to execute!

This isn't a problem with the spec text, as the observable behaviour is all correct. But we should definitely cover this case in test262 (as it must not be covered or it would have been noticed earlier) and then additionally it would be nice to profile the reference implementation to figure out why it's so slow and improve that, so that we don't take +10 seconds on our test262 tests.

(I discovered this with the exhaustive test scripts that I'm writing.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions