Open tmbb opened 7 years ago
A possible optimization would be to have some degree of "loop unrolling", if performance measuerements show it's helpful. The degree of unrolling could even be specified by the user, with a iterations_per_function_call parameter. For known maximum counts you could eliminate recursion completely (for a reasonably low number of maximum counts)
Hmm, that is possible. Perhaps an unroll of an inline call up to a user-specified max (with a trade-off of larger code generation) before it calls back to anonymous function calls. I'll leave this open to remind me for when I get time to put it in. Or feel free to PR it. :-)
You say that:
A possible optimization would be to have some degree of "loop unrolling", if performance measuerements show it's helpful. The degree of unrolling could even be specified by the user, with a
iterations_per_function_call
parameter. For known maximum counts you could eliminate recursion completely (for a reasonably low number of maximum counts)