mirror of
https://github.com/NLnetLabs/unbound.git
synced 2025-12-27 18:20:02 -05:00
counting speedup.
git-svn-id: file:///svn/unbound/trunk@986 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
parent
99dfad38b2
commit
cc8dfa660d
2 changed files with 4 additions and 3 deletions
|
|
@ -8,6 +8,7 @@
|
|||
- loop check different speedup pkt-dname-reading, 1% faster for
|
||||
nocache-recursion check.
|
||||
- less hashing during msg parse, 4% for recursion.
|
||||
- small speed fix for dname_count_size_labels, +1 or +2% recursion.
|
||||
|
||||
21 February 2008: Wouter
|
||||
- speedup of root-delegation message encoding by 15%.
|
||||
|
|
|
|||
|
|
@ -370,17 +370,17 @@ dname_count_size_labels(uint8_t* dname, size_t* size)
|
|||
{
|
||||
uint8_t lablen;
|
||||
int labs = 1;
|
||||
*size = 1;
|
||||
size_t sz = 1;
|
||||
|
||||
lablen = *dname++;
|
||||
while(lablen) {
|
||||
labs++;
|
||||
*size += lablen+1;
|
||||
sz += lablen+1;
|
||||
dname += lablen;
|
||||
lablen = *dname++;
|
||||
}
|
||||
*size = sz;
|
||||
return labs;
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue