The TL;DR is really: No idea what I'm doing here, so I might as well blog about it.
An application doesn't magically allocate less memory when running under a different kernel. The underlying idea must be that LLVM wins over gcc in a real world scenario, which certainly would be interesting, but there is really nothing to suggest it here.
It's definitely not a deep technical analysis as it's not written by a kernel engineer, but it's also plausible. VM management and swapping can and do have implementation quality differences on this scale.
The kernel VM is all about heuristics. In a memory pressure situation, it's constantly discarding cached pages that it thinks are better used for other data, making decisions about whether to swap out some data to make room for more cache, etc.
If you remember/look at the history of Linux VM and swap behaviour tuning and algorithms, there have been large improvements and regressions in this area historically.
Absolutely, but the claim here is entirely different, "my application used less memory when running on FreeBSD". While within the realm of the possible, it is more likely it is running on a completely different configuration, or "memory used" changed meaning, or both.
An application doesn't magically allocate less memory when running under a different kernel. The underlying idea must be that LLVM wins over gcc in a real world scenario, which certainly would be interesting, but there is really nothing to suggest it here.