3 ms·
Hm. Defying the laws of physics again, are we?
by empressplay 11y ago
Hm. Defying the laws of physics again, are we?
- onion2k 11y agoI'm not sure how suggesting a uiWebView wrapper might only use 10% of performance compared to native is really 'defying the laws of physics'. The reason it's catching up is because the browser is essentially is moving out of the way. For example, right now, if I write a GLSL fragment shader and run it in a native app it runs on the GPU exactly how you'd expect. If I then use the same shader in JS using WebGL ... it does exactly the same thing on the GPU. The performance is the same. In a few years the same will be for the rest of the code - it'll be loaded by a browser but it'll be running basically the same instructions on the CPU as a native app. The browser chrome, security sandboxing, and a few other bits will slow things down a little, but not so much that we'll need to develop native code except for games that really push the limits of the platform they're on.