Ben Kietzman created ARROW-10625:
------------------------------------

             Summary: [C++] Optimize Future<> creation
                 Key: ARROW-10625
                 URL: https://issues.apache.org/jira/browse/ARROW-10625
             Project: Apache Arrow
          Issue Type: Improvement
          Components: C++
    Affects Versions: 2.0.0
            Reporter: Ben Kietzman
            Assignee: Ben Kietzman
             Fix For: 3.0.0


{{Future<>}} is more expensive to construct than necessary. A few optimizations 
could be pursued:
- Store the future's result in the same allocation which houses the 
ConcreteFutureImpl
- Apply the small buffer optimization to FnOnce so that small continuations do 
not incur another heap allocation
- Contention for the global waiter lock is unlikely to be an issue, but it'd be 
good to measure
- Futures will usually have few callbacks, so a vector may be unnecessary



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to