[svn] commit: r1488 - /trunk/src/lib/dns/name.cc

BIND 10 source code commits bind10-changes at lists.isc.org
Wed Mar 17 18:39:14 UTC 2010


Author: jinmei
Date: Wed Mar 17 18:39:13 2010
New Revision: 1488

Log:
added a note about the maptolower[] array.

Modified:
    trunk/src/lib/dns/name.cc

Modified: trunk/src/lib/dns/name.cc
==============================================================================
--- trunk/src/lib/dns/name.cc (original)
+++ trunk/src/lib/dns/name.cc Wed Mar 17 18:39:13 2010
@@ -47,8 +47,13 @@
 /// unit than this file may not be initialized correctly.
 /// There are several ways to address this issue, but in this specific case
 /// we chose the naive but simple hardcoding approach.
+///
 /// These definitions are derived from BIND 9's libdns module.
-///
+/// Note: it was not clear why the maptolower array was needed rather than
+/// using the standard tolower() function.  It was perhaps due performance
+/// concern, but we were not sure.  Even if it was performance reasons, we
+/// should carefully assess the effect via benchmarking to avoid the pitfall of 
+/// premature optimization.  We should revisit this point later.
 static const char digitvalue[256] = {
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 16
     -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, // 32




More information about the bind10-changes mailing list