Speedup subnet selection
First we use a selector structure where all possible keys are (so not the query itself), second the most interesting key is the source address of the query (interesting here means mainly the key which should not change between two queries from the same or similar clients.
So I propose to cache selector => subnet selection results in a hash table (unordered multi map) keyed by the source address.
Note as this can slow down things where there are a few subnets conditions of use, cache sizing, etc, should be analyzed (so it is an idea).
Changed for a more global research of subnet selection speedup.