daypack-dev / timere

OCaml date time handling and reasoning suite
MIT License
68 stars 7 forks source link

Add optimisation pass for pattern #34

Open darrenldl opened 3 years ago

darrenldl commented 3 years ago

Rewrite things like ns = [0, 999_999_999] to ns = [] (wildcard) before passing the pattern to Pattern_resolver.resolve (or handle it inside Pattern_resolver.resolve) to remove unnecessary performance penalty - very noticeable now since ns level pattern has been introduced.

darrenldl commented 3 years ago

Partially addressed: added optimisation pass during construction via Timere.pattern, but no further optimization is done during Timere.union right now.