Qt's performance
-
I need to write a very fast client that could respond to a server that sends a lot of information 170 times per second. Client should read, process and respond to server as fast as possible. Most of process is on strings and primitive data-types. I don't know if Qt is suitable for this or not. I like to use Qt because it's really easy to use (in comparison with std). but I'm wondered about performance. People suggested me to use std instead of Qt. Some others said Qt's library isn't so much slower than std.
What you suggest?
-
The Qt equivalents to a lot of STL stuff are as quick or even quicker than their STL counterparts. Since QString is a unicode beast, you might run into some speed issues, but that is very dependent on what the contents of the strings are. As long as you don't have localization in your strings (plain ASCII that is) you could probably do most using a QByteArray instead anyway, which may have the knack over std::string. Anyway, use QTestLib for a bit of benchmarking :)
-
You can always mix and match, too. So if you find Qt too slow for something and want to use STL instead, just do so:-)
QByteArray should work for storing internationalized strings in utf8 format, too. Of course it is harder to work with the string contents that way.
-
Would be great with some wiki-content on different types of performance tips&tricks in Qt. For example, what is the best way to iterate different kind of collections, QString vs QByteArray, QImage vs QPicture vs QPixmap and I'm sure there are plenty of info on this topic that could be written on the wiki.