3 ms·
> Google and Apple chose to support Javascript natively it wouldn't have these dramatic performance issues What would "supporting Javascript natively" mean? If
by pcwalton 10y ago
> Google and Apple chose to support Javascript natively it wouldn't have these dramatic performance issues
What would "supporting Javascript natively" mean? If you mean AOT, classic AOT (without some pretty fancy research-level PGO or something) is not a viable compilation strategy for JS.
I do agree heavily with your overall point that the JS blame is misplaced. People often forget that JS is faster than Objective-C at important things like method calls for systematic reasons.
- Mahn 10y agoBy supporting natively I mean provide a layer of APIs that let developers interact with the phone and in particular with the display at a low level, while still writing JS; I imagine that if you could draw on the screen bypassing canvases and html views entirely it would solve most issues.
- DonHopkins 10y agoYou mean like NativeScript? https://www.nativescript.org/ https://www.nativescript.org/
- pcwalton 10y agoHow would that differ from WebGL?
- LeoNatan25 10y agoI assume the grandparent means access to UI APIs, not just drawing. I think there would still be significant performance drawbacks to "native JS".