pattern match constant constructors first #13

Closed
xrchz opened this Issue Jan 12, 2015 · 1 comment

Projects

None yet

1 participant

@xrchz
Member
xrchz commented Jan 12, 2015

An optimisation to pattern-match compilation is to reorder matches so that constant constructors come first, because the test for them is cheap. Combined with exhaustiveness checking, this can make some cases very fast. Such reordering could probably happen in exhLang.

@xrchz xrchz added the enhancement label Jan 12, 2015
@xrchz
Member
xrchz commented Aug 19, 2016

@felixk42 is looking into this.

@xrchz xrchz added a commit that closed this issue Nov 11, 2016
@xrchz xrchz Add exh_reorder to the compiler
Updated backendProof, which required proving syntactic properties
(set_globals/esgc_free) - this was surprisingly difficult.

The implementation and proof of the reordering phase itself is due to
Felix Kam (with my help).

Closes #13.
508c120
@xrchz xrchz closed this in 508c120 Nov 11, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment