8

Many times I hear that software compiled at my hardware will work faster at my hardware. Can I win 10% of performance of Firefox or Chromium if compile from source?

Vitaly Zdanevich
  • 1,094
  • 4
  • 19
  • 39
  • No sure way to tell unless you actually do so. Maybe ask a Gentoo user. Though I doubt it. – muru Nov 09 '15 at 18:28
  • "Can I win 10% of performance of Firefox or Chromium if compile from source?" That would heavily depend on the options used during compiling in both situations. I would though assume the one we use is compiled such that the speed is the highest possible against the features provided so a 10% gain is doubtful. – Rinzwind Feb 25 '16 at 08:37
  • Turn off some internal features of Firefox to get it faster. [Although in German, might be helpful because a lot is listed](https://www.privacy-handbuch.de/handbuch_21n.htm) – PythoNic May 24 '16 at 17:54

3 Answers3

3

As a Gentoo user I can say for sure: it depends.

  • If you disable some heavy options your application will work faster.
  • If you enable some risky optimizations and they work - your application will work faster.
  • If you use upstream defaults, your application will work slower.
  • If you misconfigure anything, application will be slow and unstable.

Generally, there is no noticable improvement that can be achieved by simple recompilation of the app. The only difference are heavy CPU-bound applications like video encoders. They perform slightly better with every new CPU technology and every new compiler.

Barafu Albino
  • 6,401
  • 1
  • 34
  • 42
1

I have very basic knowledge and experience in compiling from source. But as far as I came to know, there are some advantages in compiling an app from its source.

Basically, you can add or remove features from an app which is great if you need some specific features in it rather than installing whole of the app.

Therefore, if you compile an app based on your need, you will get exactly what you need rather than whole of the app which can improve the performance.

Have a look on these articles:


Since this post was made 3 month ago, I would request you to share any possible answer to your question if you have come to.

Bests

Mostafa Ahangarha
  • 4,358
  • 7
  • 35
  • 51
  • 1
    Good answer Mostafa, I'd like to complete it with the example of the gentoo GNU/linux distribution's firefox compiling guide. (gentoo normally compiles packages against using binaries) https://wiki.gentoo.org/wiki/Firefox#USE_flags (the USE flags are for customizing the compilation, and is a good show of how much you can tune your firefox installation and performance by switching ON/OFF compilation options) – gentooza Feb 25 '16 at 09:04
0

While you might get better performances by compiling a program from source and disabling/enabling particular options to tailor it to suit your needs, in this particular case you're talking about a web browser. I'd say that the performance of web browsers heavily depend on the network connection speed and the bandwidth of the website you're visiting, and has little to do with an optimized compilation.

Therefore it's not worth the trouble.

You might get much better performances by installing the binaries and then some specific browser plugin to e.g. block scripts or ads.

dr_
  • 807
  • 10
  • 18