Hacker News new | past | comments | ask | show | jobs | submit login

> And Safari saves like 20% to 30% of your battery life over Chrome... > And both are due to Apple's own JIT engine...

I feel like that claim needs a source. I'd be amazed if the JS engine had anywhere near such a substantial effect on battery life.




The JS engine is not the only reason for Safari/WebKit's superior battery life but it's definitely one contributing factor.

When loading webpages, one of the most important factors to saving power is reaching an idle state as quickly as possible. For many pages, that requires being fast at executing JS that runs only once or only a few times. Safari dominates on this, thanks to WebKit and JavaScriptCore. You can see this on JSBench, which runs JS modeled on real page loads and interactions: http://plg.uwaterloo.ca/~dynjs/jsbench/

I applaud Chrome's recent work on battery life. But I think it would be fair to say that safari is still the best in this area. And also that our excellent results have inspired Chrome and others to do better, much as in an earlier era Chrome inspired other browsers to get more serious about JS performance.


But given most JS code in the real-world is mostly dominated by DOM performance, and not JS engine performance. Certainly JSC's llint gives it a substantial benefit over V8 on cold code, but I'd be surprised if it accounted for even the majority of the battery life gain. I'm not questioning Safari's lead here, just how it's so much better. (I think the lead is clear, with perhaps only Edge getting close, but that's hard to compare.)


Like I said, the JS engine is likely not the main factor. But it does make a difference. I don't have a detailed breakdown to share but we do measure these things. :-) The prior poster was wrong to imply it's all down to the JS engine, but swapping WebKit for Blink would very likely hurt our battery life.

Windows itself has worse battery life than OS X on identical hardware, so it's hard to compare Mac browsers to Windows browsers. Safari on OS X is the best laptop browsing power efficiency you can get, and likely the best battery life barring laptops with super huge batteries.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: