Here's the VB test code I used to test Catter's performance as compared to VBscript. The results of the test are also below. Dump ' Clean up the catter. Nothing ' Stop the clock. Here are the test results.
All times are in milliseconds.
26419.2 112.03 You can see that it takes about three times longer to get Catter up to speed for a single concatenation, and even after a few dozen concatenations, Catter lags behind. Catter is an STL vector of STL wstrings. Catter's implementation calls on the reserve methods of both the vector and wstring classes. The implementations of these classes are designed so that their execution time stays linear under these circumstances. They accomplish this by doubling their allocated memory when they need to grow, thereby avoiding making too many allocations and fragmenting the heap.