Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Does a package performance is different when it's compiled from sources, or installed from repository ? Is it possible, what during the compilation, the package will be "more adapted" (performance, stability) to Your system, if it's compiled on it ?

share|improve this question
i know one point surely . If you manually installed a package means thats not going to receive any updates from Ubuntu . even any updates are released , you have to get them manually . But if you installed a package from repository then it will receive all kind of its updates like Bug fixes , new releases . Hope that helps a bit. – Raja Jul 2 '12 at 14:53
Thanks. The question is about performance, I'm informed about updates, which should be done manually in such case. F. – Fedir Feb 14 '13 at 11:39
up vote 8 down vote accepted

Unless you are doing serious optimization during the build, or making significant changes to what features you are building, for very complex programs, it is very unlikely you will see any performance benefit. And even with the serious optimizations, you will still only see minimal improvement. There's no real advantage to building applications in such a manner, on Ubuntu, for the most part.

share|improve this answer
Although I agree with you in general, one caveat would be when a newer version (that contains performance/stability enhancements) is available from source than the one available in the repos. – reverendj1 Jul 2 '12 at 15:36
Perhaps, but the question implied explicitly those versions in the repo, as if the binary compilation as-is is performance detriment itself. If a newer version exists with such fixes, it is still better I think, to update the existing source package from the Ubuntu archive using the new version of the app/library, and building it in a PPA. This keeps things upgradable from the distro, and doesn't potentially leave files lying around the system, which can cause problems. – dobey Jul 2 '12 at 15:41
I hardily agree with all that you have said. I was just mentioning it, because the OP did not explicitly specify whether they were talking about the same version or not. – reverendj1 Jul 2 '12 at 15:52

You will not get any performance boost if you recompile things on your system, unless your Ubuntu is highly customized, like using a lot of core libraries from another source.

The trick is that all packaged for Ubuntu are build on a real Ubuntu system, which uses the same packages at yours. That means that the building environment is 100% the same system, all libraries have identical bindings etc, only user config differs. Because of that, when binary packages are build, a lot of aggressive optimization can be applied, and they will be still valid on your system. This way Ubuntu can provide users with packages whose performance is maximized.

The chance that packages you compile on your own will have better performance is very low. It's even probable that they will be working slower, because a lot of optimization which is not enabled by default is manually triggered when building packages for Ubuntu repositories.

Concerning stability, the reasoning is the same. Because packages are build on an Ubuntu system, which has exactly the same libraries as you do (provided you got them from repositories), there will be no difference in their behavior.

Concluding, do not expect any profits when building apps on your own.

However, if you use custom, modified libraries or core packages, that do not originate from Ubuntu repositories, it may be beneficial to rebuild applications which use them. However, most probably the difference will be so small that difficult to notice, so it may be not worth the hassle.

share|improve this answer

Generally no, but there are exceptions here and there.

  1. Compiling Firefox 18 from source with flags "-march=native -pipe -O2" seemed to decrease those little periods of unresponsiveness during page loads, but nothing else changed. Compiling it with flags "-march=native -pipe -Os" made it 16.5MB smaller in RAM. It launched noticably faster as a consequence, and seems to take up less RAM with 30+ tabs open, but all the menu options seemed to take forever.
  2. Compiling OpenArena from source with flags "-march=native -pipe -O2" increased avg framerate from 28.7 (timedemo results) to 33.4 over install from repository. That's a big improvement.

Everything else I've compiled from source either has , runs roughly the same, or sometimes breaks/runs like crap.

share|improve this answer
Thanks for such precise examples ! F. – Fedir Feb 14 '13 at 11:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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