Basile Starynkevitch <basile@xxxxxxxxxxxxxxxxx> writes: > On Sun, 2025-05-04 at 11:57 +0200, Florian Weimer wrote: >> * Krystian Kazmierczak via Gcc-help: >> >> > * Is this performance degradation considered normal for gcc under >> > memory pressure? >> >> Yes, I think it's expected. Very little software these days is >> prepared to deal with swapping. > > On some Linux systems, you could consider using > https://man7.org/linux/man-pages/man2/madvise.2.html > But GCC don't use it (and using it would be very system specific). > > If you compile large software (like GCC itself) and want to optimize its build > time (but don't agree on spending money on hardware) you could instead play with > the number of jobs (the -j option to make). > > If you really care about GCC itself consider coding your GCC plugin to deal with > that. I don't think it is very useful unless your GCC compiled translation units > are very strange (e.g. machine generated C++ files containing hundreds of C++ > functions each having dozen of thousands of statements). I don't think this user has indicated they're writing a plugin at all.