Results 1 to 10 of 10

Thread: Why qt execution is so slow,this is a test

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: Why qt execution is so slow,this is a test

    By the way... the "C++ test" is flawed. First of all the only "C++" thing in it is using "new" and "delete" instead of "malloc" and "free" and second of all all the other "tests" increment the buffer char by char instead of preallocating everything at once.

    Here is a more proper test of this useless case and the results. If you analyze the results, you'll see what takes the most time and how to counteract it.

    text Code:
    1. ********* Start testing of StringTest *********
    2. Config: Using QTest library 4.7.4, Qt 4.7.4
    3. PASS : StringTest::initTestCase()
    4. RESULT : StringTest::testC():
    5. 16 msecs per iteration (total: 66, iterations: 4)
    6. PASS : StringTest::testC()
    7. RESULT : StringTest::testCPreallocated():
    8. 0.60 msecs per iteration (total: 77, iterations: 128)
    9. PASS : StringTest::testCPreallocated()
    10. RESULT : StringTest::testCPP():
    11. 112,716 msecs per iteration (total: 112,716, iterations: 1)
    12. PASS : StringTest::testCPP()
    13. RESULT : StringTest::testCPPPreallocated():
    14. 0.63 msecs per iteration (total: 81, iterations: 128)
    15. PASS : StringTest::testCPPPreallocated()
    16. RESULT : StringTest::testCPPString():
    17. 4.3 msecs per iteration (total: 70, iterations: 16)
    18. PASS : StringTest::testCPPString()
    19. RESULT : StringTest::testByteArray():
    20. 5.8 msecs per iteration (total: 94, iterations: 16)
    21. PASS : StringTest::testByteArray()
    22. RESULT : StringTest::testByteArrayPreallocated():
    23. 2.7 msecs per iteration (total: 89, iterations: 32)
    24. PASS : StringTest::testByteArrayPreallocated()
    25. RESULT : StringTest::testByteArrayPrefilled():
    26. 0.11 msecs per iteration (total: 60, iterations: 512)
    27. PASS : StringTest::testByteArrayPrefilled()
    28. RESULT : StringTest::testQString():
    29. 10 msecs per iteration (total: 80, iterations: 8)
    30. PASS : StringTest::testQString()
    31. RESULT : StringTest::testQStringPreallocated_reserve():
    32. 9.3 msecs per iteration (total: 75, iterations: 8)
    33. PASS : StringTest::testQStringPreallocated_reserve()
    34. RESULT : StringTest::testQStringPreallocated_resize():
    35. 7.6 msecs per iteration (total: 61, iterations: 8)
    36. PASS : StringTest::testQStringPreallocated_resize()
    37. RESULT : StringTest::testQStringPrefilled():
    38. 1.0 msecs per iteration (total: 65, iterations: 64)
    39. PASS : StringTest::testQStringPrefilled()
    40. PASS : StringTest::cleanupTestCase()
    41. Totals: 14 passed, 0 failed, 0 skipped
    42. ********* Finished testing of StringTest *********
    To copy to clipboard, switch view to plain text mode 
    Attached Files Attached Files
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


Similar Threads

  1. Lib not found in execution.
    By Netich in forum Installation and Deployment
    Replies: 6
    Last Post: 30th October 2009, 14:28
  2. RunTime Execution
    By hasnatzaidi in forum Newbie
    Replies: 3
    Last Post: 5th October 2009, 06:45
  3. execution in QT
    By adamatic in forum Qt Programming
    Replies: 4
    Last Post: 20th February 2009, 08:12
  4. Execution error
    By Shuchi Agrawal in forum Installation and Deployment
    Replies: 10
    Last Post: 9th February 2007, 12:12

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.