Clearly this needs to work not just on my machine, and on some more test cases. I will try a bit more later. My guess is that some magic of constant propagation or something is making it ignore the branches in the tuple case? The entire lookup table is in the type of the tuple.
But if it does hold up, then I suggest proposing the minimal possible change, just take the existing _fact_table64
and make a tuple starting with 1, and call that in the existing functions (with [n+1]
). And writing up a really easy to read set of benchmarks.