Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Qt's performance
Forum Updated to NodeBB v4.3 + New Features

Qt's performance

Scheduled Pinned Locked Moved General and Desktop
7 Posts 5 Posters 3.6k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    soroush
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • G Offline
      G Offline
      giesbert
      wrote on last edited by
      #2

      I can only teöll my opinio, but I never tried.

      Qt is more comfortable, so I would prefer it and give it a shot. Make an easy test to check, whether it is fast enough or not.

      Nokia Certified Qt Specialist.
      Programming Is Like Sex: One mistake and you have to support it for the rest of your life. (Michael Sinz)

      1 Reply Last reply
      0
      • F Offline
        F Offline
        Franzk
        wrote on last edited by
        #3

        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 :)

        "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

        http://www.catb.org/~esr/faqs/smart-questions.html

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          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.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mario
            wrote on last edited by
            #5

            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.

            1 Reply Last reply
            0
            • F Offline
              F Offline
              Franzk
              wrote on last edited by
              #6

              [quote author="Tobias Hunger" date="1299148411"]QByteArray should work for storing internationalized strings in utf8 format, too. Of course it is harder to work with the string contents that way.[/quote]The same goes for std::string, obviously.

              "Horse sense is the thing a horse has which keeps it from betting on people." -- W.C. Fields

              http://www.catb.org/~esr/faqs/smart-questions.html

              1 Reply Last reply
              0
              • S Offline
                S Offline
                soroush
                wrote on last edited by
                #7

                Thanks :-)

                I'm going to play around Qt instead of std. I hope ipcs and strings of Qt could run fast enough...

                1 Reply Last reply
                0

                • Login

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • Users
                • Groups
                • Search
                • Get Qt Extensions
                • Unsolved