4 ms·
Sounds like a nightmare to me. Want to change browsers? Buy a new device with a different processor or suffer massive battery or performance penalties. Want to
by vel0city 5y ago
Sounds like a nightmare to me. Want to change browsers? Buy a new device with a different processor or suffer massive battery or performance penalties. Want to change media players? Buy a new device with a different processor or suffer massive battery or performance penalties.
- JohnBooty 5y agoBy that logic, any time anybody optimizes for anything, they're somehow punishing everybody else with "penalties." What if somebody on the Intel/AMD side of things includes some optimizations for SSE, AVX, etc? Are they punishing everybody else? At any rate, my idea was less than half baked and again, not exactly something I'm pining for. Was just thinking about things Apple might conceivably be able to try with their unique vertical integration.
- vel0city 5y agoSSE/AVX/etc aren't optimizations for a single application, they're optimizations for specific kinds of math instructions. Any application using that processor can use them, and they're overall pretty general instructions. Hyper-optimizing for a particular application means the way that particular application works gets accelerated, but not things in general. Sure, if a browser behaved identically to Safari, it too would potentially experience the speed up barring any weird microcode/firmware that only allows those extensions to be used by Apple-signed binaries which is a whole 'nother level of nightmare. Stepping outside of that highly optimized path is essentially a penalty though as it by definition wouldn't be so highly optimized. And once that optimized path has been etched into the silicon, there's no real updating it unless we move to CPUs being more like FPGAs which isn't likely to happen.
- FireBeyond 5y agoWhen they make optimizations for something, and then _artificially limit_ access to those optimizations (for applications that absolutely could utilize them) for purely commercial or marketing reasons, then yes, absolutely they're punishing. Intel doesn't forbid compilers from generating code for SSE or AVX. Apple _does_ forbid Chrome from using energy management and other APIs for no other reason than to keep it less efficient than Safari.
- JohnBooty 5y agoI didn't realize Safari made such heavy use of private APIs. That is unfair and I would not support that behavior whether talking about private software APIs or private hardware instructions. What I was half-assedly imagining wouldn't be anything like that. (Although, FWIW, Chrome has private APIs too: https://blog.chromium.org/2021/01/limiting-private-api-availability-in.html https://blog.chromium.org/2021/01/limiting-private-api-avail... Different use case, but still.)
- CamJN 5y agoThat's already the case, though. The battery life difference using Safari versus Firefox/Chrome is staggering. Sure, you don't have an option to buy a FF/Chrome mac atm, but you've definitely bought one where safari is the only decently efficient browser.
- vel0city 5y agoIs that really due to the hardware or because of the overall behavior of the two browsers? Isn't Safari better battery-wise than Chrome even on Intel Macs? IIRC Edge has better efficiency in Windows than Chrome, so its not surprising me Chrome is less efficient. Its a bloated shadow of its original self.
- FireBeyond 5y agomacOS has a bunch of energy management and performance-related "private" APIs and libraries that Safari is allowed to call, but Chrome is not.
- JohnBooty 5y agoCan you point me to information about this? The Google results are a bit polluted with (hilariously enough) articles about Google's recent restriction of Chrome's private APIs. I've been having trouble figuring out exactly which private bits and bobs Webkit might be taking advantage of on MacOS.
- dev_tty01 5y agoThat's the second time you have made that assertion in this discussion. Can you be more specific please? I have not seen any evidence of that, but I am very interested.
- edgyquant 5y agoI would also like to see some documentation on these private apis. Sounds fascinating I wonder what they’re doing differently? Are they exposing the same kind of abstractions but the public api is purposely slower? Why would they not want all apps to use less battery life?
- novok 5y agoMost of the time the hardware accelerators are available for everyone to use, if they program to it. Ex ffmpeg and other media encoding engines all have the ability to write coders / decoders against certain hardware accelerators. You can choose CPU coders, Nvidia specific ones, etc.
- sharikous 5y agoExcept that they locked access to the hardware accelerators via their APIs. The Neural Accelerator is only available through CoreML and even some of the benchmarks show features that are not available to the public (int8)
- vel0city 5y agoSure, that's been the case in the past and maybe that's what JohnBooty meant with his comment, but his comment specifically pointed out a particular browser so I took it to mean CPU extensions targeted for how Safari operates. Like, specific ways Safari handles Javascript or rendering with all of its specific quirks etched into silicon. Other browser manufacturers would have to pretty much behave like Safari or else run as a penalty on legacy instruction sets.
- dagmx 5y agoThat already happens though given that different hardware has different support for hardware accelerated playback of video. E.g even on the M1 Pro/Max, you're going to get much better performance and battery if you're using a video editor that supports prores decoding.
- vel0city 5y agoI get that, but that's a bit more general than saying Safari will run faster than Chrome because Apple made Safari-specific application instructions rather than H.264 will be more power efficient than Theora on a given CPU. Any browser could support any particular hardware's video decoders, but only Safari behaves exactly like Safari. The person I was replying to was writing specifically about CPU instructions to enhance the performance of Safari in particular, not of all browsers in general.