-
Notifications
You must be signed in to change notification settings - Fork 30.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: investigate jumbo builds #18742
Comments
out of curiosity; how does the benefit comes for the generated code? is it more code comes for compiplation at a time provides improved escape analysis, or better method inline-ability, or something else? who benefits by large - C or C++? |
@gireeshpunathil Since the compiler has full visibility it can do whole-program optimization (like escape analysis, inlining, pruning, etc.) that it normally only does on a per-compilation unit basis without LTO. |
Is there any noticeable improvement in any benchmarks after building this way? |
I would not bet on any performance win through jumbo builds. It's a crutch to improve build time. It's not officially supported and can break in V8 at any time. And it did on several occasions, only to be fixed by friendly contributors from Opera. The V8 team at Google does not use jumbo builds because we use goma. |
I didn't see any on my big brawny Intel desktop but it seems to make node start up a little faster on a Raspberry Pi 1 (closer to 400 than 500 ms now.) Working hypothesis: better code density and/or less duplication in the parser and compiler. Perhaps we could also get that by turning on |
https://bugs.chromium.org/p/v8/issues/detail?id=7339 - upstream now tests jumbo builds regularly. |
http://lists.llvm.org/pipermail/cfe-dev/2018-April/057579.html - there seems to be some movement on supporting this in clang, which is great. |
Any updates on this? We should be able to at least enable |
V8's GN build knows about jumbo builds but the *.gyp files we maintain don't. It's probably easier now to hack it into our gyp fork more than anything else. I did a prototype for the Makefile generator I could PR. |
Ping @bnoordhuis ... is there reason to keep this open? |
Sorry, I forgot to close this. V8 removed support for jumbo builds in v8/v8@e6f62a4 so there's no longer any reason for us to pursue this. |
A jumbo build concatenates compilation units into a single file before compiling. E.g.:
It trades build parallelism and memory consumption for:
V8 in particular is a good candidate and already supports jumbo builds. To illustrate:
make -j8
: 6:30m wall clock time, 47:48m cpu timemake -j1
: 4:37m wall clock time, 4:34m cpu timeThat'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.
The text was updated successfully, but these errors were encountered: