Uploaded image for project: 'Mesos'
  1. Mesos
  2. MESOS-9086

Optimize range subtraction operation.

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.7.0
    • Component/s: None

      Description

      Based on the profiling result of MESOS-8989, the range subtraction operation is about 2~3 times more expensive than that of addition. It's not obvious that this has to be the case.

      The current range subtraction implementation relies on boost IntervalSet, the construction cost of the IntervalSet could be the culprit:
      https://github.com/apache/mesos/blob/9147283171d761a4d38710f24ba654f8a96e325c/src/common/values.cpp#L378-L387

      I think we could do better by writing a one-pass (with sorting) algorithm like that of addition.

        Attachments

          Activity

            People

            • Assignee:
              mzhu Meng Zhu
              Reporter:
              mzhu Meng Zhu
              Shepherd:
              Vinod Kone
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: