Statistics of add/remove case operations for switches

Hi all,

Some numbers:

Total switches count..........................16636
Total cases added.............................78682
Total cases removed...........................575

Switches with removals........................277
Rem/Add(in switched with removals)............0,3168762305
Switches melted away (all cases was removed)..8

Why I made this statistics.
New switches supposes that all cases should be sorted. After we made remove-case operations, we either need to rebuild switch internals or place tombstones in holes. If operation removes more than 50% of cases it is better to rebuild switch, if operation removes a tiny percent of cases, that it is better to place tombstone.

XLS file and patch with harness are in attachment.

-Stepan.

SwitchAddRemoveStats.xls.tar.xz (203 KB)

switch-statistics-2.patch (3.42 KB)