[ 
https://issues.apache.org/jira/browse/MESOS-2126?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14217095#comment-14217095
 ] 

Joris Van Remoortere commented on MESOS-2126:
---------------------------------------------

https://reviews.apache.org/r/28195/
https://reviews.apache.org/r/28196/

> Libprocess Future: Improve performance, Vector instead of Queue
> ---------------------------------------------------------------
>
>                 Key: MESOS-2126
>                 URL: https://issues.apache.org/jira/browse/MESOS-2126
>             Project: Mesos
>          Issue Type: Improvement
>          Components: libprocess
>            Reporter: Joris Van Remoortere
>            Assignee: Joris Van Remoortere
>              Labels: future, libprocess, performance
>
> std::queue does dynamic allocation upon construction.
> std::vector does dynamic allocation upon insertion.
> Since Future's Data structure currently aggregates 5 queues, this implies a 
> lot of dynamic allocation upon construction of a future. In crucial paths we 
> tend not to use most of these queues, meaning the allocations were of no 
> benefit.
> If we replace std::queue with std::vector then we pay per use (for the first 
> few, exponentially less as the size grows), which in most cases, and 
> definitely in crucial paths, reduces dynamic allocation and improves 
> performance.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to