apple / apple/foundationdb

Find actors which can be inlined

Open
#2,223 1 comment 0 reactions 0 assignees View on GitHub
performance
Dominant language
C++
Stars
16.7k
Forks
1.6k
Avg merge
1d 20h
Merged PRs (30d)
126

Description

```
ACTOR Future bar( LargeObject x ) {
wait(delay(1));
x.x++;
return void();
}

ACTOR Future foo( LargeObject x ) {
wait( bar(x) );
return void();
}
```

In this example the `bar` could be inlined to avoid copying the object `x`. Ideally the actor compiler could identify opportunities to do this optimization itself, however even if that is not possible we could at least look for actors which are constructed in wait statements and manually optimize locations which cause a lot of copying.

Contributor guide

Open the contributing guide

Research direction

Start with the actor compiler and the example pattern where bar(x) is constructed inside wait. Determine whether the compiler can identify actors suitable for inlining to avoid copying LargeObject values, or whether affected locations must be found manually. Done means a defined approach for identifying and optimizing these copying opportunities.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers, performance
Issue type
Refactor
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.