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

Optimize range subtraction operation.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • None
    • 1.7.0
    • 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

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

            Dates

              Created:
              Updated:
              Resolved: