I\'m optimizing a custom object -> XML serialization utility, and it\'s all done and working and that\'s not the issue.
It worked by loading a file into an Xml
The encoding difference is because two different measurements are being mixed. UTF-32 requires 4 bytes per character, and is inherently slower than single byte data.
If you look at the large (100K) element test, you see that the time increasesw by about 70mS for each case regardless of the loading method used.
This is a (nearly) constant difference caused specifically by the per character overhead,