This is related to the above change. I had to roll back some of the code because it was buggy but I hope to fix it. The idea is that you are searching for a bunch of values using a term filter. You will wind up binary searching in the dictionary for each term. However, this can be done more efficiently. You can take the "middle" term you are binary searching for and bisect the dictionary so other binary searches only need half the space.

In this way if you are searching for a lot of terms (this is often the case in USCP) you can speed things up. There was a bug here so I undid the code to get kafka 0.8 out the door. I know our CPU usage seems to be about 10% right in this code.