Open Bug 1973765 (sm-early-sh-compile) Opened 1 year ago Updated 4 months ago

[meta] Eagerly baseline compile self-hosted code

Categories

(Core :: JavaScript Engine: JIT, task, P3)

task

Tracking

()

People

(Reporter: bthrall, Unassigned)

References

(Depends on 7 open bugs, Blocks 1 open bug)

Details

(Keywords: meta)

No description provided.
Blocks: sm-jits
Depends on: 1972804
Depends on: 1973445
Depends on: 1972784
Depends on: 1973460
Depends on: 1970438
Depends on: 1970164
Depends on: 1979345
Depends on: 1827914
Depends on: 1980995
Depends on: 1981780
Depends on: 1982184

The current status of this project is that the code is landed under a preference that is disabled by default. We do not see overall performance improvement on Speedometer3, but there are some subtests that improve (Preact and Svelte) and some that regress (Angular and Vue). We see some opportunities to further improve the performance.

While the performance still needs work, we do hope these code changes lay the foundation for future features around sharing JIT code that we would like to do, such as sharing Baseline code across processes or storing self-hosted Baseline code in the Firefox binary.

I have already demonstrated that enabling self-hosted code early Baseline compilation reduces the total number of Baseline compiles for self-hosted functions, which means we are doing less work overall.

I haven't measured the memory cost of caching the self-hosted JIT code, but we expect it to be small.

Next steps: Explore performance improvements, such as for bug 1870391. We could also profile the compiled self-hosted code to see if we can improve the bytecode performance (since there are several slow paths that we needed to use to make the code Realm-independent).

Depends on: 2031489
Depends on: 2031571
Depends on: 2042755
Depends on: 2042857
Depends on: 2019812
You need to log in before you can comment on or make changes to this bug.