Results 1 to 2 of 2

Thread: The efficiency of QtAlgorithm

  1. #1
    Join Date
    Aug 2008
    Location
    Nanjing, China
    Posts
    66
    Thanks
    12
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default The efficiency of QtAlgorithm

    HI,everyone,
    The title of the thread is huge, but I can tell a little.I hope the gurus to add some real things.
    Today, the "qSort" is really amazing me,it is faster than stl "sort", time is 0.7 vs 1."qStableSort" is slower than "sort" not jumping out of my expection. time is about 6 vs 1.
    In QSortFilterProxyModel, the sort() function uses "qStableSort", but I need it to behave faster,I want to change it to "qSort".Is there a fast and safe way to do the job?
    Jerry

  2. #2
    Join Date
    Jul 2008
    Location
    Germany
    Posts
    507
    Thanks
    11
    Thanked 76 Times in 74 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows

    Default Re: The efficiency of QtAlgorithm

    Hi,

    QAbstractItemModel::sort() is virtual, so just subclass QSortFilterProxyModel, and reimplement it.

    Ginsengelf

Similar Threads

  1. Efficiency is the name of the game
    By baray98 in forum General Programming
    Replies: 7
    Last Post: 19th September 2007, 20:03
  2. Removing items from QPtrList efficiency issues
    By kalos80 in forum Qt Programming
    Replies: 1
    Last Post: 5th April 2007, 12:04

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.