4 ms·
The problem isn't necessarily Apple's laziness with updating Safari, I think it's more the fact that they insist on using their own JavaScript engine. They coul
by wyqydsyq 11y ago
The problem isn't necessarily Apple's laziness with updating Safari, I think it's more the fact that they insist on using their own JavaScript engine. They could very easily just use Blink and V8 which would significantly cut down the maintenance work in keeping Safari up to date as well as leveraging the work already done rather than trying to reinvent the wheel to nobody's benefit.
For example most ES2015 features have been available in Chrome, Edge and Firefox for over 6 months now, but Safari still doesn't support any of it (other than this tech preview) because it's development time is shared with the rest of Apple's ecosystem.
Unless Apple dedicates more resources to Safari in order to keep pace with the rest of the browsers, they'll be playing catch-up ad infinitum.
- lstamour 11y agoExcept the reason Blink forked from WebKit was all the Apple-specific code they could drop. Apple really focuses on hardware integration and getting maximum battery life out of their engine. I can't say the same about Chrome yet.
- coldtea 11y agoOnly Safari (betas) have better ES6 support than Chrome ones according to a latest article on Ars. And Safari saves like 20% to 30% of your battery life over Chrome... http://bgr.com/2015/08/05/google-chrome-vs-safari-battery-life/ http://bgr.com/2015/08/05/google-chrome-vs-safari-battery-li... http://www.theverge.com/2015/4/10/8381447/chrome-macbook-battery-life http://www.theverge.com/2015/4/10/8381447/chrome-macbook-bat... And both are due to Apple's own JIT engine...
- gsnedders 11y ago> 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.
- om2 11y agoThe 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/ 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.
- gsnedders 11y agoBut 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.)
- om2 11y agoLike 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.
- alwillis 11y agoWebKit supports 98% of ES2015, more than any other major browser engine, so keeping pace isn’t a problem for Apple: https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/ Now with Safari Technical Preview, if you want access to all of it in a more accessible package than the WebKit Nightlies, you can have it. BTW, Apple has been doing what appears to be a amazingly good work on JavaScript Core lately, extending their performance lead: https://webkit.org/blog/5852/introducing-the-b3-jit-compiler/ https://webkit.org/blog/5852/introducing-the-b3-jit-compiler....
- justabystander 11y agoYou realize that although WebKit supports 98%, Safari itself as of version 9 supports 53%. As is noted in your own link to the compatibility table. So, yes, keeping pace is a problem for Apple, since the other browsers are significantly ahead and the Safari 9 series was released half a year ago. Even Microsoft Edge has been doing better. You might actually have a leg to stand on when Safari 9.1, released 10 days ago, gets its ES6 state tested and uploaded to the compatibility table. Or it might be more embarrassment about Apple's slow release cycle. It's also unclear as to whether Safari Tech Preview will contain the majority of ES6 code in Webkit or if it will be "curated" into a significantly less compliant and useful state. Once again, tests will tell. What is certain for now is that six months of Safari have left it at 53%, which, among many other examples, has been Safari dragging everyone else down. Just because they have untested, unsupported code in a development branch doesn't mean that their main browser with a completely different name and a glacial release cycle gets a pass for holding up the class. The Tech Preview is a good starting step, but until these things have a clear release cycle that shows current WebKit ES6 feature support making its way into a release build before the end of the year, we'll continue to be upset at them with cause.
- alwillis 11y agoIt's also unclear as to whether Safari Tech Preview will contain the majority of ES6 code in Webkit or if it will be "curated" into a significantly less compliant and useful state. Apple has been clear from the moment they released Safari Technology Preview: Get a preview of the latest advances in Safari web technologies, including HTML, JavaScript, and CSS. Safari Technology Preview includes the most recent version of WebKit, the rendering engine that powers Safari. This is from https://developer.apple.com/safari/technology-preview/ https://developer.apple.com/safari/technology-preview/ Short answer: Safari Technology Preview also scores 98% on the ES6 test.