You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@mesos.apache.org by "Meng Zhu (JIRA)" <ji...@apache.org> on 2018/07/18 17:58:00 UTC

[jira] [Created] (MESOS-9086) Optimize range subtraction operation.

Meng Zhu created MESOS-9086:
-------------------------------

             Summary: Optimize range subtraction operation.
                 Key: MESOS-9086
                 URL: https://issues.apache.org/jira/browse/MESOS-9086
             Project: Mesos
          Issue Type: Improvement
            Reporter: Meng Zhu
            Assignee: Meng Zhu


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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)