Skip to content

Commit ef2c98f

Browse files
authored
Optimize checking involving large discriminated union types (#42556)
* No array literal subtype reduction when contextual type is present * Accept new baselines * Fast path in relations and filtering of pure discriminated union types * Create maps for mixed unions, but not for small or primitive only unions * Create many-to-many mapping with certain limits, also use in CFA * Use constituent maps in CFA for switch statements, cleanup, add comments * Revert change to apparent contextual type / better criteria for map eligibility * Deduplicate array literal element types * Accept new baselines * Filter in false case only when discriminant property has unit type * Only subtype reduce unions with less than 100 distinct types * Accept new baselines * Caching and quick discriminant checks in subtype reduction * Accept new baselines * Remove deduplication logic now that subtype reduction was optimized
1 parent 1db6003 commit ef2c98f

File tree

4 files changed

+166
-36
lines changed

4 files changed

+166
-36
lines changed

0 commit comments

Comments
 (0)