Very clever.
As you know, I'm one of those people that absolutely love Tally-Table-like constructs but, as I've also said, it's not a panacea of performance. In this case, it requires what I believe to be some unnecessary complexity and, although it performs in roughly the same amount of time, does require 3 times the number of reads on the million row example.
My suggestion would be to go with the simplest code in this case especially because it uses only a third of the IO even if it is logical reads.
--Jeff Moden
Change is inevitable... Change for the better is not.