does anyone have any idea why this is ~22 times slower than libc/getaddrinfo()?
Hi Paul,
The code that is involved creates the resolver object, notices there
is a local etc/hosts entry, creates the reply and destroys the
resolver object involved. (and a couple mutexes are acquired and
released).
The etc/hosts file was read in on the first query, and the contents
are retained in memory in the ctx.
Perhaps these mallocs are the overhead that libc does not have to
bother with?
Best regards,
Wouter