I looked up specifically examples of this and didn’t find answers, they’re buried in general discussions about why compiling may be better than pre-built. The reasons I found were control of flags and features, and optimizations for specific chips (like Intel AVX or ARM Neon), but to what degree do those apply today?

The only software I can tell benefits greatly from building from source, is ffmpeg since there are many non-free encoders decoders and upscalers that can be bundled, and performance varies a lot between devices due to which of them is supported by the CPU or GPU. For instance, Nvidia hardware encoders typically produce higher quality video for similar file sizes than ones from Intel AMD or Apple. Software encoders like x265 has optimizations for AVX and NEON (SIMD extensions for CPUs).

  • kevincox
    link
    fedilink
    arrow-up
    7
    ·
    5 days ago

    For me the biggest benefit is the ease of applying patches. For example in Nix I can easily take a patch that is either unreleased, or that I wrote myself, and apply it to my systems immediately. I don’t need to wait for it to be released upstream then packaged in my distro. This allows me to fix problems and get new features quickly without needing to mess with my system in any other way (no packages in other directories that need to be cleaned up, no extra steps after updates to remember, no cases where some packages are using different versions and no breaking due to library ABI breaks).

    Another benefit that you are pointing at is changing build flags. Often times I want to enable an optional feature that my distro doesn’t enable by default.

    Lastly building packages with different micro-architecture optimizations can be beneficial. I don’t do this often but occasionally if I want to run some compute-heavy work it can be nice to get a small performance boost.

    • comfy
      link
      fedilink
      arrow-up
      1
      ·
      3 days ago

      OP asked for specific examples, do you have any you think are worth emphasizing?

    • Buckshot@programming.dev
      link
      fedilink
      arrow-up
      2
      ·
      5 days ago

      I love this about Nix. Had a case this year where I’d hit a bug in the upstream, I fixed it and submitted a PR but then could reference that PR directly for the patch file until a new release finally made it out.