12 ms·
"Optimizations should be added to V8" for the asm.js subset of JavaScript
- raphinou 14y agoSeems there's just an issue opened (less than one day ago) to add asm.js support. I didn't see any indication that a decision was taken...
- james4k 14y agoPosted by a chromium developer, so there's internal interest at the very least.
- moondowner 14y agoThe issue is opened by a someone who is involved in the development as well https://code.google.com/u/kbr@chromium.org/ https://code.google.com/u/kbr@chromium.org/ It's not from some random dude on the internet.
- 8ig8 14y agoTrue, but see Paul Irish's comment on kbr: https://news.ycombinator.com/item?id=5453892 https://news.ycombinator.com/item?id=5453892
- rurounijones 14y agoWell it was raised by one of the chromium devs which gives it semi-official status at least I guess.
- deleted 14y ago[deleted]
- eksith 14y agoIt's not just for the browser experience. I see all this is a preemptive move to make developing games (and other "rich experience apps") on Firefox OS more attractive to new developers. Who knows, we may even have some ports of existing games for it pretty soon. Very smart move IMO. Edit: To clarify. To think that the devs here are interested means the Mozilla folks got the right idea.
- mtgx 14y agoCan you port say OpenGL 4+ games to asm.js and the browser, or will you be able to use only the WebGL/OpenGL ES 2.0 API for it? If so, then we will only see mobile/indie games on the web for now, at least until WebGL gets more advanced graphics API's.
- eksith 14y agoDon't see OpenGL 4+ making it to asm.js, but if anything has shown me with my limited experience in gaming, it's that people don't always flood to games because of the eye-candy alone. Case in point: Angry Birds. I think WebGL/OpenGL will do nicely to create a game like Ikaruga (http://en.wikipedia.org/wiki/Ikaruga http://en.wikipedia.org/wiki/Ikaruga). It's probably one of the hardest, but most enjoyable games I've ever played and I think mobile/indie game developers will pull it off. If anything this opens up a new democracy in the previously restrictive world (if not outright closed as in iOS) game development for devices and consoles.
- Raphael_Amiard 14y ago> Don't see OpenGL 4+ making it to asm.js It won't make it into asm.js anyway, but into the WebGL spec.
- mtgx 14y agoI just wasn't sure whether this is bound to WebGL or not. But even if it is, it's only a matter of time before WebGL gets graphics API's as advanced as the full OpenGL (5-10 years). I think we're already going to see OpenGL ES 3.0 being implemented into WebGL within the next 2 years, and even if WebGL never adopts the full OpenGL (it has a lot of cruft anyway), keeping up with the OpenGL ES API's should be good enough (OpenGL ES 3.0, ES 4.0, ES 5.0, etc). I was thinking the OpenGL ES will be the future most popular graphics API anyway (on any platform). It's just that Nvidia announcing full OpenGL 4.3 support for Tegra 5 kind've made me re-evaluate that. But if other mobile chip makers just stick with OpenGL ES, and WebGL does, too, then OpenGL ES should still become the most popular graphics API in the next few years.
- 14y ago
- sirn 14y agoNow this is big. Doesn't this means Node.js would benefit from asm.js addition in V8 as well? Few months ago by Brendan Eich: "Get your tums out, pal. We're taking PNaCl down for good this year with http://asmjs.org/ http://asmjs.org/. Cross-browser."[1] With the announcement of Unreal Engine and this, seems like he's one step closer to the goal. Now only JSC and Trident left... [1]: https://news.ycombinator.com/item?id=5226967 https://news.ycombinator.com/item?id=5226967
- Ygg2 14y agoJSC? Anyway I agree. People in the previous thread clamoring for NaCl, claiming asm.js isn't supported by other browser now look really, really foolish in hindsight. I'm moderately happy the Web is moving in this direction. I'm glad Mozilla is moving it in that direction :)
- sirn 14y agoJavaScriptCore, Safari's JavaScript engine.
- duaneb 14y agoI have no idea why Mozilla was so resistant to pnacl. It's a nice step beyond the nasty legacy JavaScript mess. Among other things, JavaScript is necessarily single threaded... Yea.
- Raphael_Amiard 14y ago> I have no idea why Mozilla was so resistant to pnacl Pepper for one is a pretty good reason IMHO
- sjtgraham 14y agoMore like "Chrome team member begins discussion for adding optimisations for asm.js to V8"
- paulirish 14y agokbr is one of our WebGL engineers and while he does interact with the V8 folks often, he's not the decider when it comes to what goes into V8. Your suggestion is certainly a more accurate summary. (I'm on the Chrome Developer Relations team)
- patrickaljord 14y agoUpdated.
- macspoofing 14y agoAt least it's on the radar, but man, if Chrome picks asm.js up, it's a game-changer in so many ways.
- patrickaljord 14y agoAnd it looks like they're not that into it https://news.ycombinator.com/item?id=5454337 https://news.ycombinator.com/item?id=5454337
- mraleph 14y agoI would like to note that I don't work on V8 full time anymore and all opinions that I express on twitter are mine alone and not those of employer, my current or former team. I am writing a blog post that condenses my feeling towards asm.js into something tangible. I also would like to add that it still excites me much to see JavaScript to become faster and faster and that I anticipate real world JavaScript written by human hands to become faster in the future and I don't think we need AOT compilation shortcuts for that.
- tmzt 14y agoWritten by human hand using something like TypedArrays?
- fourstar 14y agoJavascript (full-stack) will be running at least half of the most popular websites within 5 years.
- rorrr 14y agoDoubt that. Language preferences don't change that fast. PHP, Python, Ruby are extremely strong. Plus there's Go, which seems like an awesome language.
- eksith 14y agoThat's a very, very, very, bold statement! Not saying you're right or wrong, but venerable technologies have a tough time dying quietly. Also most developers tend to be fairly conservative with what they choose especially when load and performance is concerned.
- duaneb 14y agoAgain... Good luck with parallel code.
- willvarfar 14y agoyeah web workers have been driving me nuts recently. The debugging - or lack of it - is crazy.
- erichocean 14y agoYou can debug web workers in Chrome's normal debugger. It has a separate debugger instance for each worker.
- coldtea 14y ago>Again... Good luck with parallel code. Err, people have moved on from straight parallel code. It's all about message passing and isolation now, which is something Javascript can get perfectly easily (and sort of already has).
- 14y ago
- kayoone 14y agoSmart move, Asm.js could basically be the gate opener for Chrome OS. Suddenly it makes sense if the OS is just a browser, if you imagine you could run things like Photoshop, Office or your complete development enviroment from any browser. Emscripten already has examples of QT apps running in the browser, this enables a whole new world of web development.
- lucian1900 14y agoThat's already possible with NaCl, and will soon also be possible with PNaCl.
- lucian1900 14y agoConfusing downvote, what I said is factually correct. That's how Bastion, Angry Birds and I believe Netflix as well run on Chrome OS.
- Raphael_Amiard 14y agoNow i'm gonna say that plain and clear : I don't care which wins, between PNacl and asm.js, i just care that one or them wins, and gets in every browser with decent performance. Both approaches have their merits and drawbacks, I personnally prefer asm.js because of backward compatibilty and portability, but if we could avoid a 5 years fight about which is gonna bring near native perf in the browser, it would be absolutely awesome.
- itry 14y agoI care who wins and I hope its asm.js For me, its not that important, that every browser supports it. I have a large base of Business clients who have no problem, using whatever browser gets the job done best.
- daleharvey 14y agoBit of a tangent, but I couldnt help but think of bus factors when I seen the comment in the linked thread "Let's wait to land a patch until Jakob is back." https://code.google.com/p/v8/issues/detail?id=2424 https://code.google.com/p/v8/issues/detail?id=2424
- mraleph 14y agoThere is not much of a bus factor here. I filed Issue 2424 and so let me explain: my fix was a very hackish local way (not the way I'd really like to see it fixed) that just demonstrated how much of the performance can be gained. A generic implementation is obviously preferred. I would like to do it myself but I don't work on V8 full time anymore so I can't dedicate my own time to it.
- daleharvey 14y agoHeh yeh I probably should have put a disclaimer in there since I wasnt trying to imply that there actually was a problem. It was just the first thing that popped into my head when I read the comment.
- munificent 14y agoThere are surprisingly few people on Earth who are first-rate VM hackers, so the bus factor for anything in that domain tends to be low.
- snarfy 14y agoI'm just glad this development will allow you to use other languages besides javascript. Emscripten is cool, but not practical without something like this standardized. If it can render an Unreal level, it should be able to render a Qt widget sufficiently. Everything I've seen in this regard so far is inferior to just using html/css. As this tech develops that may not always be true.
- soolwan 14y agoWhether it's asm.js or PNaCL or something else, it seems that we are headed towards a future where the client part of web applications is crafted with compiled languages rather than JavaScript. That would be closer to the way mobile is now, with the exception that applications are discovered through a browser. It's starting to feel as if the JavaScript renaissance that we are having is taking us to a place where actually crafting web applications with JavaScript is factored out. That would certainly change what it means to be a front-end web developer. Maybe it will be that JavaScript will still have a place with very simple document-type content, while heavier applications will be made with compiled langauges. It's going to be interesting to watch this unfold.