-
-
Notifications
You must be signed in to change notification settings - Fork 35.2k
Closed
Labels
buildIssues and PRs related to build files or the CI.Issues and PRs related to build files or the CI.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.
Description
A jumbo build concatenates compilation units into a single file before compiling. E.g.:
$ cat $all_sources > all.cc && c++ all.cc
It trades build parallelism and memory consumption for:
- Usually better generated code; kind of a poor man's LTO.
- CPU time. Because the compiler has to parse headers only once, it's often dramatically faster.
V8 in particular is a good candidate and already supports jumbo builds. To illustrate:
- V8, clean normal build,
make -j8: 6:30m wall clock time, 47:48m cpu time - V8, clean jumbo build,
make -j1: 4:37m wall clock time, 4:34m cpu time
That's not a typo! On my machine it's 33% faster in human time and a whopping 10x faster in cpu time.
The one downside is that it needs a lot of memory. Without sharding you probably shouldn't try this on a machine with less than 8 GB RAM.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
buildIssues and PRs related to build files or the CI.Issues and PRs related to build files or the CI.help wantedIssues that need assistance from volunteers or PRs that need help to proceed.Issues that need assistance from volunteers or PRs that need help to proceed.v8 engineIssues and PRs related to the V8 dependency.Issues and PRs related to the V8 dependency.