3 ms·
Other two comments are wrong. The correct answer is that the compiler now builds everything on demand if it's not already built. This now includes the standard
by 38 3y ago
Other two comments are wrong. The correct answer is that the compiler now builds everything on demand if it's not already built. This now includes the standard library as well. Previously built versions of standard library modules were being shipped.
- mighmi 3y agoIt seems like it rebuilds itself with PGO. I can't tell if I'm being paranoid/didn't only include stdlib in something, but I ran some random programs, restarted my computer and the install is now at 320mb, vs. 213 when I first untarred it. https://go.dev/doc/pgo https://go.dev/doc/pgo > PGO in Go applies to the entire program. All packages are rebuilt to consider potential profile-guided optimizations, including standard library packages.
- 38 3y agoPGO is opt in, just like Rust. you have to explicitly tell the compiler that you want to use it.
- yencabulator 3y agoGo1.21 uses PGO by default, if the file default.pgo exists. > The -pgo build flag now defaults to -pgo=auto, and the restriction of specifying a single main package on the command line is now removed. If a file named default.pgo is present in the main package's directory, the go command will use it to enable profile-guided optimization for building the corresponding program.