On older x86’s this technique labored properly as a result of the instruction prefetch penalties had been paid on a per instruction foundation regardless (there was no cache to put them into!) However starting with the 486, this was not a sensible reply since transient loops paid no instruction prefetch penalties, which rendered the compiled bitmap methodology utterly ineffective.
I had a somewhat giant std::map that I was producing using Microsoft’s CString object as the important thing. Efficiency was unacceptable. Since all of my strings had been an identical in size, I created a category wrapper round an old style fastened-measurement array of chars, to emulate the interface of CString. Sadly I’m unable to recollect the exact speedup, nevertheless it was vital, and the ensuing performance was greater than satisfactory.