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
QtWS25 Last Chance

Rope Data Structure

Scheduled Pinned Locked Moved General and Desktop
4 Posts 2 Posters 1.4k Views
  • 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 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
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on 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 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
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on 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

          • Login

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