Re:Actually Portable Executables
by matheusmoreira on Sunday February 28, 2021 @08:22AM
(#26293241)
Do you build on tmpfs? I started doing that and it makes builds ridiculously fast. $XDG_RUNTIME_DIR is perfect for this, I just make a directory there and symlink the build directory to it. Even added some makefile logic to ensure the link target exists:
[ Parent
| on HN ]
Re:Actually Portable Executables
by ed25519FUUU on Sunday February 28, 2021 @09:56AM
(#26293786)
Good optimization, thanks for the pointer!
Re:Actually Portable Executables
by matheusmoreira on Sunday February 28, 2021 @09:30PM
(#26299101)
It also reduces wear on storage devices. Why write temporary build artifacts to permanent memory after all? Gotta use those 32 GB of RAM for something.
Linux will automatically cache all source files in RAM because of the page table cache. Writes to slow storage devices are eliminated through tmpfs. Amazing really.
Also, if you are using BFD ld, you should consider gold or lld. Significantly faster if the link is the slow step.
Also much lower peak memory usage for lld, which is great if you have multiple concurrent link steps.