System Clock Rate affects firefox some performance

It is well-known that google chrome browser will change SCR to 1ms when starting itself, and someone argue what chrome did will not be friendly with Notebook Power, but we don’t know whether SCR modifying will affect browser.

Now I take firefox 33.0 as an example to study it.

For no PGO edition, with or without SCR 1ms results:

Benchmark Without SCR With SCR
Sunspider 187.4ms +/- 0.9% 188.1ms +/- 0.9%
V8 19122 19296 19517 20182 19515 19526
Kraken 1459.0ms +/- 3.0% 1442.9ms +/- 1.8% 1450.4ms +/- 2.4% 1432.5ms +/- 2.0%
Octane 19975 19699 19583 20327 19302 20058
Google RoboHornet 86.57 88.47 113.73 114.50
CanvasMark 2013 5228 5196 5221 5211
DOM Core Tests 2878.46runs/s 2871.91runs/s
Peacekeeper 3349 3712

From the results above, we can see:
There are very similar results in Sunspider, V8, Kraken, Octane, CanvasMark and DOM Core Tests.
And with SCR, Google RoboHornet ( about +30% ) and Peacekeeper ( about +11% ) has a good gain, which is good news.

So according to the conclusion above, I introduce SCR feature on my pcxFirefox 33.0, and to improve Notebook Power life, I also add Power Type detecting:
1. scr.enabled : The option control whether to modify SCR, whose default value is true ( Enabled SCR modifying at startup )
2. scr.always : The option control whether to modify SCR if you use Battery Power, whose default value is false ( If you use Battery Power, set scr.always to false wont modify SCR, if you set it true, that will ignore Power type detect. )

And please note, if you modify the two config options, you should restart firefox again, because at present the feature in implement on startup code, maybe in future, I will adopt more smarter method.

Let’s see pcxFirefox 33.0 with BetterPGO on Google RoboHornet without and with SCR details:
without SCR ( set scr.enabled to false )
with SCR ( set scr.enabled to true )

You can see with SCR Google RoboHornet will improve 30.58%, whose gain is similar with no PGO edition.