Skip to content

fix(functors): move "flattening" many levels of chain or & composition from c++ into python

Christoph Hasse requested to merge chasse_functors_flatten into master

NEEDS: Analysis!885 (merged) Moore!1546 (merged)

Moving the "flattening" of functor compositions from C++ to the python level.

The motivation is to reduce the amount of types we instantiate to try and somewhat reduce the compilation time & memory overhead.
Testing the hlt2_pp_thor cache on an opt+g build I see a reduction across the 5 compilation units from O(12-13Gb) -> O(~10Gb)

cc @rmatev this MR also includes a small fix to the code_repr of chained functors.

Edited by Christoph Hasse

Merge request reports