5 ms·
This is by far my favorite tech talk of all time. It goes into why WASM can run faster than native code in many contexts, the reason being that it get's around
by anm89 5y ago
This is by far my favorite tech talk of all time. It goes into why WASM can run faster than native code in many contexts, the reason being that it get's around the overhead of OS security rings
https://www.destroyallsoftware.com/talks/the-birth-and-death-of-javascript https://www.destroyallsoftware.com/talks/the-birth-and-death...
- eatonphil 5y agoThat talk is from 2014 and Wikipedia says wasm was announced in 2017?
- AprilArcus 5y agoit post-dated and took inspiration from Mozilla's asm.js, which was highly influential on wasm.
- capableweb 5y agoasm.js was first mentioned in 2013. asm.js was eventually superseded by wasm and is pretty much the beginning of wasm as we know it. Didn't watch the talk, but could asm.js be the thing the presenter was talking about?
- time_to_smile 5y agoWhile the parent is does seem to be treading into Poe's law territory, it's not entirely correct to dismiss that talk's relationship to wasm based on the dates your quoting. Bernhardt in the talk explicitly mentions asm.js which is the precursor to wasm (it's even mentioned in the wikipedia article you skimmed a bit too quickly). asm.js was released Feburary 2013. I'm surprised HN has such a short memory, but the impetus for that talk was a clearly disturbing trend at the time implying that everything should be done in javascript. Node.js was gaining rapid popularity, people were discussing javascript as the new C for using as the language to write example code in, and while things like asm.js were exciting, they seemed to point towards the hilariously nightmarish future Bernhardt is discussing there.
- dnsco 5y agoThis talk is about asm.js which is a precursor technology to wasm, parents logic seems to be "wasm is an improvement on asm.js". I have no idea if the kernel isolation benefits the garry bernhardt talk is about apply.
- georgyo 5y agoThe base argument here doesn't make sense. WASM requires an interpreter which must be native. The argument is that this interpreter can be smarter about what crosses OS security rings. But those same improvements could be done in the native compiler or interpreter. The next argument could be that many things using the WASM target would focus more effort on improving it so all WASM targets benefit outpacing their individual optimizations. This one is harder to dismiss outright, but instead of optimizing for machine code you are now optimizing your WASM output. Also this intermediate byte code representation already exists for both LLVM and JVM, which many languages target. It is difficult to see WASM magically improving performance at all and especially not dramatically enough to encourage people to switch to it for that reasoning.
- ninkendo 5y agoThat’s not the right conclusion to take from that video. WASM isn’t faster than native code. It’s that an operating system written from the ground up to use a language VM (for instance, wasm) to implement all memory protection, on the system — and most importantly, no other memory protection, including page tables or processor-level isolation that normally separates kernel code from user space — may end up being more performant than what we have now. Running wasm on a standard OS kernel like Linux/windows/darwin is not going to give you the benefits. The benefits come from eliminating system call overhead associated with switching in and out of the kernel protection context, which is something you need if you’re executing raw machine code which can load/store any memory address. If you simply eliminate the ability to run arbitrary machine code, you can just let everything run in kernel space and use the language VM (like wasm) to protect memory. The result may or may not be faster overall, but it’s purely hypothetical today because essentially no operating system works this way. (Microsoft wrote a research OS back in the ‘00s to try this out but it ultimately didn’t turn into a shipping product. There may be other research OS’s out there that toy with this idea, but nothing in production… maybe the old symbolics lisp machines work on this principal but I’m not sure. There may have been some similar machines in the smalltalk days as well.)
- zamalek 5y ago> Microsoft wrote a research OS back in the ‘00s to try this out but it ultimately didn’t turn into a shipping product. They called it SIPs (software isolated processes). You can see the benefit of WASM for this problem, though. It has gained significant traction, and it is significantly simpler than CLR. I really hope something comes of it.
- ativzzz 5y agoSPIN, a research OS in the 90s also explored a similar concept by allowing the kernel to be extended via controlled interfaces. > For instance, the SPIN Web server executes entirely in the kernel address space. http://www-spin.cs.washington.edu/ http://www-spin.cs.washington.edu/ But like you said, not in production.
- dluan 5y agohttps://twitter.com/garybernhardt/status/1341534427227123713 https://twitter.com/garybernhardt/status/1341534427227123713 the fact that i am more frequently having to dig up this tweet to show people lately is astonishing