Hi,
I coded a little function called TCase to convert a sentence's case to Title Case. I coded it using strings, and it does work fine. But when I started using sentences that exceed 5 KB it became dead slow. A 3 KB sentence will take 1 sec to process, while a 30 KB sentence will take 2 minutes easily. I was upset. So I recoded the whole function once again using arrays. Now a 100 KB sentence takes 0.5 secs hardly, and boy I was pleased.
This is my question:
How does VB handle strings internally in comparison to arrays, and why is the difference in string manipulation speed.
I'd appreciate any tips that could optimize string manipulations in VB.
Thanks.




Reply With Quote