libknot: optimize knot_dname_lf for many short labels
The goal is to improve answering performance when the query name has many short labels (e.g. reverse IPv6 queries).
Test gcc 10, 8 cores, 15M QPS, example.com.:
- 1 x 7 label qname: RPS change 75% -> 75%
- 7 x 19 label qname: RPS change 52% -> 55%
- 12 x 4 label qname: RPS change 42% -> 49%
- 25 x 2 label qname: RPS change 25% -> 27%
- 50 x 1 label qname: RPS change 10% -> 19%
Edited by Daniel Salzman