Aside from just counting the results, is this going to possibly affect compilation/code generation to get speed/size optimization?
Well Yes. That is the plan at least :) CTFE could stream it's branch-counts directly into the optimizer.I am not in the position to say how tricky it would be to provide this information to the backend, but I guess it will take a bit of fiddling.