Results 1 to 7 of 7

Thread: Vector vs List

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Vector vs List

    See, items in a vector are on adjacent memory locations so inserting in front and in between is slow. Because front/mid insertion can lead to large numbers of items having to be moved by one position in memory. So if you have no requirement of front/mid insertion the go for vector otherwise go for list.
    And benefit of a list is more than vector, because insertion is fast and index-based access is very fast.

  2. The following 2 users say thank you to yogeshgokul for this useful post:

    phillip_Qt (8th October 2009), umulingu (1st January 2010)

Similar Threads

  1. QFtp hidden files/folder's list
    By jay in forum Qt Programming
    Replies: 1
    Last Post: 26th December 2008, 12:12
  2. Replies: 2
    Last Post: 19th September 2008, 05:21
  3. Single slot for multiple list boxes
    By Sheetal in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2008, 06:53
  4. Replies: 1
    Last Post: 22nd October 2007, 02:04
  5. QComboBox drop list button events
    By maird in forum Qt Programming
    Replies: 5
    Last Post: 20th October 2007, 19:25

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.