Hi!
In Episode 154 Casey mentioned the poor performance when using the standard string library.
This reminded me back to the first project I worked, we worked with the CryEngine2.
CryEngine2 used the CString class, the standard string library for Windows
CString, I believe the latest CryEngine still uses the same string library, am not
100% it was used only for MFC or also for the runtime game, you can answer that yourself here anyways
CryEngine source.
When we were working with strings for our own project, I clearly remember we changed all the CString to std::string, I can imagine this had a huge impact in the compilation times as Casey pointed out, but it also turned our base code into a very confusing nightmare.
All of the very experienced coders, the senior ones, they agreed to convert all to std::string back then, not so experienced after all. With Casey's episode it brought my attention to that particular question back then, why? Maybe for portability purposes it was better, but neither us nor CryEngine2 Editor was ported to linux or any other platform.
Is CString too superior to std::string that the CryEngine guys decided to go go go Windows?
Regarding the usage of std::string. Anyone with experience using the CString, would the performance be better if we avoided std::string in our project (compilation times, maybe runtime execution also)?
Are you aware of any other string library that has better performance for games or should we just apply Compression OP and implement what's needed ourselves?
Cheers!