Is there a measurable difference in CPU performance between Gentoo and Raspbian?

With Gentoo you use different compiler flags and with the USE flags compile only what you need. In Raspbian all software is precompiled.

Because the Raspbian is already compiled especially for Raspberry Pi, is there a real difference in performance or is the only benefit to customize the distribution for your need?

I ask this question, because I struggle again, which distribution I should choose. I'm familiar with both distributions.

  • Check if gentoo can use hard float. If so, they are both the same, there won't be any real performance differences. If not, gentoo will be slower. $0.02: I like gentoo, but I'd think hard about doing all that compiling on the pi. It is not quick that way. At all.
    – goldilocks
    Mar 5, 2013 at 12:25
  • This is an old thread, and the solution wasn't available at the time the question was asked, but there's a 64-bit Gentoo port available for the Raspberry Pi 3 and 4. I don't use it, and I'm still not wild about Gentoo, but the developer seems to be providing good support for users. Details/discussion here: Gentoo - Raspberry Pi Forums
    – scruss
    Jan 2, 2020 at 16:04

2 Answers 2


Raspbian is compiled with decent general settings for armhf. You might manage to get some code fractionally faster with Gentoo, but:

  1. Your Raspberry Pi will be spending most of its time building and rebuilding packages, and
  2. Raspbian is by far the most popular distribution for Raspberry Pi. There will almost always be a pre-built package for what you need, and the support community is great.
  • 1
    funroll-loops.info I honestly do like gentoo, BTW, but "fractionally" would probably be the key word here. Esp. if used synonymously w/ "imaginarily".
    – goldilocks
    Mar 5, 2013 at 13:32
  • Yes, goldilocks, but I was trying to be more polite than that. I was a Gentoo user a decade back. I think I've apologized to everyone affected by the debacle by now.
    – scruss
    Mar 5, 2013 at 14:38
  • I try to avoid blatantly spurious and inappropriate comments but that one is just too hard to pass up :D ...OTOH, I saw that before I tried gentoo and it didn't stop me or make me think less of the concept, and I went on to enjoy it for a while. It might in fact save some people some time if they read that, say, on day 2 of their first gentoo install ;)
    – goldilocks
    Mar 5, 2013 at 14:44
  • To 1. you can build packages with the help of other even x86 machines using distcc and cross compiling. Do you have any proof (benchmark?) that it's only "fractional" faster with gentoo?
    – keiki
    Mar 6, 2013 at 11:54
  • 1
    All benchmarks are contrived ways of measuring speed. For building real applications, you'd have to balance flat-out code speed optimizations against (very limited) memory footprint. You'd have to set that individually for every program you build. If you want to run Gentoo, go nuts, set up a distcc rig, have fun. Just don't expect to be more productive, or have a more stable setup, than Raspbian users.
    – scruss
    Mar 6, 2013 at 22:07

If you have a Raspberry Pi 2/3 then you can get at a speed increase by using Gentoo... Gentoo ARMv7 code instead of Raspbian ARMv6.

You get other speed benefits by using a version of gcc that produces code that runs about 10% faster.

You can go even faster by using a base system that is compiled for the new floating point unit 4 and enabling the NEON hardware acceleration.

Here is a guide: Install Gentoo on Raspberry Pi 2 / 3 + USB Hardrive.

Also on that site are pre-compiled optimised base systems:

So, yes you can...

Note, doing Gentoo on an SD Card does not make sense, but using an external USB Hard drive makes a lot of sense.

Oh, and that set up gives Dual Boot, so you can boot Raspbian as a Rescue Disk for Gentoo.

  • Note that those armv7a binaries haven't been updated since 2016. The standard Gentoo cross-build setup still builds for armv6 so it will work on all Raspberry Pis.
    – scruss
    Jun 24, 2018 at 18:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.