Hacker News new | ask | show | jobs
by kevingadd 2309 days ago
WebAssembly adds new functionality to the browser runtime environment that isn't available to regular JavaScript. It was originally 1:1 with asm.js/JS but that stopped being true relatively quick.
1 comments

It's faster. That's literally it. There aren't any new I/O facilities.
A few examples of things it adds that are not widely available in JS (if at all, or requiring awkward hacks/hints in JS), off the top of my head:

int64

uint32

popcnt

copysign

reinterpret_cast equivalent (the js hack for this is abysmal)

pthreads

SIMD

AOT compilation

To be fair, it's been a while since I was last one of the authors of the webassembly spec, so I could be missing some things.

Could ads be served with web assembly?
Yes, though I don't know if it makes sense to do it for any reason other than hiding from ad blockers.
Well, for some it is the only reason needed...