C/C++
aa397.txt
Associated article: A winner in both space and time
Tags: Database C/C++
Published source code accompanying Fred Wild's article on the I- string mechanism, a hashing mechanism that provides both compact storage and fast equality tests. Also see AA397.ZIP.
_Algorithm Alley_
by Fred Wild
Example 1:
string name = "joe";
Istring fastname (name);
ASSERT ( *fastname == "joe" ) ;
ASSERT ( (*fastname).length() == 3 ) ;
ASSERT ( fastname->length() == 3 ) ;
Listing One
////////////////////////////////////////////////////////////////////////////
// Istring class internalizes strings for fast comparison for equality
using std::string ;
#...


