6 ms·
Asm.js Speedups Everywhere
- cromwellian 12y agoGreat seeing the improvements. I was initially a big skeptic of asm.js, but for high performance c-translated code, it seems good enough now. A 1.5x hit is a concern, but we've been paying these hits on the JVM and other languages for years. I'm still sad there's no SMP/multithreading yet, but SharedArrayBuffer looks promising. The only thing missing is the fact that for GC'ed languages there's no efficient translation yet (e.g. Java/GWT).
- tambourine_man 12y agoYou have a very fast GC'd language right there already, if you don't mind writing javascript. I know it has won me over the years, once you know the pitfalls to avoid.
- TazeTSchnitzel 12y agoIn this way, the browser is the ultimate platform: * portable low-level, static code (asm.js translation) * portable high-level, dynamic code (JS translation) * interoperability between the two * single set of APIs * supported virtually everywhere
- woah 12y agoThere are a lot of people who are very angry about this.
- TazeTSchnitzel 12y agoYeah, and it's unreasonable anger. The browser is flawed in many ways, but it's awesome that we have this universal platform and we should cherish it, rather than moaning about how something "better" should have won.
- verbin217 12y ago> we should cherish it, rather than moaning about how something "better" should have won. There are certainly incentives for which that may be true. There is also the impending, monumental investment of effort into what is necessarily only a local maximum.
- colordrops 12y agoAre there alternative proposals at this point anyway?
- lazyjones 12y agoIt's a bit less "awesome" than most people think. The point is, now that we've taken something that was originally intended for viewing documents over the network and turned it haphazardly into something we realized that we actually wanted (running applications portably and with frictionless installation), we'd better design something from scratch that does what we want without all the unbearable cruft that comes with browsers, HTML and HTTP.
- amaranth 12y agoSo what we really wanted was Java?
- Dylan16807 12y agoIf applets weren't terrible, maybe.
- TazeTSchnitzel 12y agoYou're forgetting that having everyone use your new thing is the main feature. Redesigning everything from scratch, you lose the single thing that was special about it: adoption.
- Aldo_MX 12y agoThat lot of people doesn't really matter. They prefer to complain than to embrace what the browsers offer today. They can even compile their favorite scripting language for asm.js, but there will always be excuses: > But I want native GC > But I want native Speed > But I want native _________ They'd rather die waiting for the perfect conditions than getting things done.
- Rusky 12y agoThere is absolutely no reason they (I) can't complain about the effort going into browsers that could be going into a better solution, and still take advantage of the browser at the same time. If nobody complains about the status quo even when it's awesome, we'll never move out of the current local maximum.
- Aldo_MX 12y agoI'm not against complaining, but people often forget that the web is incrementally updating, today's web is different than 2014's web, and different than 2013's web, and absolutely different than 2003's web. The fact that there aren't perfect conditions today doesn't mean that the conditions won't improve tomorrow.
- TazeTSchnitzel 12y agoThere's tons of effort going into alternatives, but it has largely gone to waste because those alternatives lack adoption, and probably always will. Focus on what we have, not what we might have had if history had gone differently. Reinventing the wheel to fix minor issues is rarely worth the effort.
- Rusky 12y agoExperiments are rarely a waste of effort just because they don't turn into something bigger; Focus on what we can have, not what we might have had. Reinventing the wheel for "minor" issues (or just for fun!) is what gave us Linux, LLVM+Clang, Go/Rust/Nim/etc., Newton's laws, Relativity, etc. Incremental changes are not the only way, nor always the best way, to make progress.
- chrisbennet 12y ago>There are a lot of people who are very angry about this. Could "woah" or someone else explain this to me? (And please don't make a snarky response, this is a sincere question from a someone who is ignorant of the dynamic at work here.)
- TazeTSchnitzel 12y agoThe browser, JS, etc. have various flaws and forms of cruft accumulated over the years, and weren't originally designed specifically for the purpose of writing applications. Of course, alternatives all have flaws and cruft, too, just different ones.
- chrisbennet 12y agoThanks for your response. So they are angry because it is a "hack" that actually affects them in some way or it one of those religious things?: 1. "I'm angry 'cause you're doing it wrong." 2. "Because open source" 3. Something only dogs can hear. 4. ???
- TazeTSchnitzel 12y agoWell, the web has certain limitations (which are slowly being dealt with, but they exist nonetheless).
- ori_b 12y agoIn short, it's shit, but it's portable shit, polished with billions of dollars of effort. It's useful, but that doesn't mean it doesn't smell.
- cromwellian 12y ago_Worse is Better_
- SixSigma 12y agoyou might like this http://harmful.cat-v.org/software/ http://harmful.cat-v.org/software/
- CmonDev 12y agoWhen people are eating shit for years, they stop noticing the smell and some even start claiming it has "the good parts" in it.
- TazeTSchnitzel 12y agoThat would imply the whole thing is shit, which it isn't.
- CmonDev 12y agohttp://en.wikipedia.org/wiki/Fly_in_the_ointment http://en.wikipedia.org/wiki/Fly_in_the_ointment
- SixSigma 12y agoIf you know of an odour free platform, the world is waiting.
- Rusky 12y agoA platform smelling bad is not a boolean flag. Almost every platform smells less than the web as far as actually using it goes; the web is just ubiquitous and frictionless as far as deployment.
- StephenFalken 12y ago"You want it (the browser) to be a mini-operating system, and the people who did the browser mistook it as an application. They flunked Operating Systems 101." -- Alan Kay
- mcav 12y agoIn this title, 'everywhere' means 'across browsers', not 'throughout all JS execution'.
- jbergens 12y agoIt almost means the same. Node is using V8 (from Chrome). Not sure if Nashorn has any asm.js optimizations but it will probably get it later if it is important to many organizations. Those are probably the most commonly used js engines out there.
- ygra 12y agoIsn't node many, many versions of V8 behind Chrome? As far as I recall, they're on an out-of-date, unsupported version of V8 and sometimes cherry-pick patches from upstream, but that's about it.
- mikerichards 12y agoI had never heard of the term "sea of nodes" architecture before. Here https://news.ycombinator.com/item?id=8118079 https://news.ycombinator.com/item?id=8118079 is HN discussion about it.
- sanxiyn 12y agoFIRM is a compiler library, like LLVM. Its difference is that it is written in C, and that it uses sea of nodes. http://pp.ipd.kit.edu/firm/Features http://pp.ipd.kit.edu/firm/Features
- nickysielicki 12y agoAm I the only one worried about the implications of asm.js and imminent close-sourcing of the web? I don't want bytecode in my browser. I barely like having some skiddie's javascript in my browser as it is currently. The fact that I'm about to lose the ability to even understand it is scary to me. (Yes, I know people compile their JS currently... But that's relatively less convoluted. and can be deconstructed to a degree. This is another level.)
- Aldo_MX 12y agoBytecode is easier to decompile than assembly code, and you can expect the output of a decompiler to resemble minified code.
- nickysielicki 12y ago>you can expect the output of a decompiler to resemble minified code. I doubt that. When your C++ is ran through LLVM's optimizer it's structurally changed to a huge degree.
- CmonDev 12y agoI think the next logical step is only allowing running manually-written scripts in a quirks mode with a big warning message to user. That would be awesome. If I am forced to a use/transpile-to crappy script language by industry then you should suffer too.
- dmm 12y agoThe web is already closed-source. You can read gmail's js but you don't have the right to modify or redistribute it.
- nickysielicki 12y agoFreedom implies openness, but openness doesn't imply freedom. Gmail's JS is open, but it is not free.
- 12y ago