From: Bert Hubert Date: Sun, 24 Aug 2008 14:18:33 +0000 (+0000) Subject: shave 25% off packet generation times (32usec -> 25 usec or so) X-Git-Tag: rec-3.2~264 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=16989b4c042daafcb7f04db2d22661dd67587652;p=pdns shave 25% off packet generation times (32usec -> 25 usec or so) git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1258 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/dnswriter.cc b/pdns/dnswriter.cc index 4befa4ff6..d56e5f0f5 100644 --- a/pdns/dnswriter.cc +++ b/pdns/dnswriter.cc @@ -67,7 +67,7 @@ void DNSPacketWriter::startRecord(const string& name, uint16_t qtype, uint32_t t d_stuff = 0; d_rollbackmarker=d_content.size(); - if(iequals(d_qname,d_recordqname)) { // don't do the whole label compression thing if we *know* we can get away with "see question" + if(!strcasecmp(d_qname.c_str(), d_recordqname.c_str())) { // don't do the whole label compression thing if we *know* we can get away with "see question" static char marker[2]={0xc0, 0x0c}; d_content.insert(d_content.end(), &marker[0], &marker[2]); } @@ -158,7 +158,7 @@ DNSPacketWriter::lmap_t::iterator find(DNSPacketWriter::lmap_t& lmap, const stri { DNSPacketWriter::lmap_t::iterator ret; for(ret=lmap.begin(); ret != lmap.end(); ++ret) - if(iequals(ret->first,label)) + if(!strcasecmp(ret->first.c_str() ,label.c_str())) break; return ret; }