The slowness is due to the CkString constructor. If the object is moved outside the loop, then performance should improve significantly.

In any case, Chilkat has addressed this problem internally and can provide a new build (v4.7.1 pre-release) that greatly improves the performance, even if the CkString object is kept inside the loop. Please let me know what version of VC++ you use, or if using a non-Windows OS, which operating system (and if it's 32-bit or 64-bit).