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. Rope Data Structure
Forum Updated to NodeBB v4.3 + New Features

Rope Data Structure

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.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.
  • V Offline
    V Offline
    vikasawadhiya
    wrote on 16 Sept 2014, 08:10 last edited by
    #1

    Does Qt provided Rope Data Structure?
    Is QString implemented using rope structure or we have to implement it.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 16 Sept 2014, 20:45 last edited by
      #2

      Hi,

      That's a question better suited for the interest mailing list. You'll find there Qt's developers/maintainers. This forum is more user oriented.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • V Offline
        V Offline
        vikasawadhiya
        wrote on 18 Sept 2014, 08:40 last edited by
        #3

        Thanks,
        So let's discuss this with a user scenario,
        I have a use case which contains a lot of string manipulation like insertion, deletion at random position (not only at begin or at end) as well as some standard operation like concatenation and substrings.

        If i use QString for all this, it will make a lot of copy and will also impact the performance. (QStringRef also doesn't help in all operations because it provides a thin wrapper around QString substrings and became invalid if QString is altered of which it is referencing.)

        So How to solve this problem in Qt ?

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 23 Sept 2014, 06:25 last edited by
          #4

          It all depends on how you use your QString, the copy occurs when you modify one of the reference counted "copy" of your QString, otherwise you are modifying it directly.

          The best you can do is benchmark QString against a rope implemented string type to see which one suites your needs best

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          0

          2/4

          16 Sept 2014, 20:45

          • Login

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