Memoize fix applications in Mu
Each time a recursive value of encoding Mu fix
is decoded, fix
is applied. That's an important source of inefficiency, especially when we encode algebraic datatypes. Indeed, if the encoding is built using mu (fun self -> union [case 1 .. self ..; ...; case N .. self ..]
the check_cases
function is called each time we encode and decode a recursive value!
The following MR introduces a basic in-place memorization of fix
inside Mu
.
Edited by Yann Regis-Gianas