I did some ad-hoc testing to verify:
randomly distributed dense terms that almost never match: 3.7% perf increase
randomly distributed dense terms that almost always match: 0%
random(10) on one field matching random(10) on another: 4.1% perf increase
terms grouped in blocks of 10 (i.e. 10 sequential docs have same value): 67% perf increase
As you can see, this really hits non-random distribution of terms the most.
The larger the blocks of terms, the larger the performance increase after applying the patch. I was able to get it up to 10x, but it's really theoretically unbounded.
Closed after release.