i guess this shows that looking up getent hostname database cache is faster than looking up local dns cache because the former is simpler in data structure?
There's also probably some savings around not having to convert between the structures used by gethostbyname and DNS questions&answers.