You would think that CString would be faster than std::string since its only made for windows while std::string is generic to work on all platforms but thats not the case.

Has anyone else ran into this? My routine was written in both std::string and CString and CString was slower.

Now a few hundred milliseconds (on a 2.2ghz core speed cpu) out of 100,000 iterations may not sound like enough to worry/care about but
#1) Speed is essential in Decal (get in and get out as fast as you can)
#2) The std::string routines seem to be arranged in a neater appearence.
#3) Its more portable in case you wish to rip the routine out for something non windows related.