Earlier quoted context omitted.
Why Hotspot? There are many bytecode languages, with their own execution environments - .NET/CLR, Parrot, BEAM, etc. wasm is an attempt to design one specifically for the web, rather than trying to shoehorn one made for a different environment.
HotSpots optimization and code generation is far superior than any other VM. But that is kind of my point - there are advanced vms out there. I don't see why the web needs its own vm apart from them. All the differences I see are fairly minimal.
Firefox’s new streaming and tiering compiler
101–110 of 229 posts
Re: Firefox’s new streaming and tiering compiler
#102Funny enough, on my workstation it seems to compile something more like 60-80 MiB/s, to keep up with my network which was recently upgraded to gigabit.
Very impressive stuff, I hope workstation CPUs can keep pace with networks.
Re: Firefox’s new streaming and tiering compiler
#103Nice article. Although, as always with articles on WebAssembly, it keeps repeating that wasm is faster than JavaScript, without ever mentioning the limitations of wasm wrt. JS (no GC, no interaction with the DOM or with JS libraries besides numbers, etc.). And that means there are zillions of developers who keep being misled in thinking stuff like "Why don't you compile to wasm to make your stuff faster?". That inclu…
No one is saying you should do your whole application in WASM though, it's really just like native extensions in any dynamic language: of course, you're not going to get GC or interaction with dynamic parts of the language in your extension, but the reason might be: - libraries written in another language, such as SQL.js - hot spots of an application that can benefit from fast number crunching (e.g., gaming, visualiz…
What I profoundly dislike is that such good articles about wasm, written by excellent technical people, all silently ignore that. I am absolutely certain that the authors know all about it, but they don't mention that to their audience, which, for the majority, doesn't know. Therefore, that very silence (not just glossing over, but actual silence) brings misinformation to the masses.
Re: Firefox’s new streaming and tiering compiler
#104Earlier quoted context omitted.
Running a native app compiled to wasm into the browser ? So the opposite of running an Electron app?
Calling it now: 1) Write a Windows app 2) Run it in the browser with wasm 3) Stuff that into Electron and distribute to Mac/Linux/Windows Why distribute the electron wrapped wasm on Windows instead of using the real native Windows app? It's more consistent this way! Single codebase! Developer efficiencies!
Re: Firefox’s new streaming and tiering compiler
#105Would be nice if it mentioned WebAssembly in the title - I presumed this was a new feature for JS in Firefox Quantum.
Re: Firefox’s new streaming and tiering compiler
#106Earlier quoted context omitted.
Is it actually a JIT? It's just compiling everything unconditionally. I guess the fact that the second tier replaces previously compiled functions with more optimized versions makes it a JIT? Or does the definition of JIT require recompiling in response to information about which code would benefit most?
Do you think for something to be a JIT it must only compile code immediately before it's used? In that case the only real JIT I know of is basic-block-versioning. I think almost all JITs will compile branches or methods to some extent before they are actually needed. Yours is probably not a reasonable definition therefore. I think a JIT is just a compiler that can compile as the program is running.
I mean, that's more or less what the name "just-in-time compiler" implies. I'm aware that the name is not necessarily a precise definition, but I'm not sure how far the definition stretches. Does JIT have a precise agreed-upon definition, or is it somewhat more vaguely defined?
Re: Firefox’s new streaming and tiering compiler
#107Earlier quoted context omitted.
How would the client know the hash is valid?
Perhaps he means you compile the code locally, hash it, and then next time you can fetch the compiled code from a server, and check the hash matches?
Re: Firefox’s new streaming and tiering compiler
#108Earlier quoted context omitted.
That would assume you trust the server not to give you malicious machine code (which you of course cannot!). wasm is specified in such a way that it is still sandboxed by the VM that compiles it. If you fetch arbitrary machine code, you cannot verify it and that leads to huge security holes!
> which you of course cannot! Didn't Google's NaCL implement verification of sandboxed machine code?
Re: Firefox’s new streaming and tiering compiler
#109Earlier quoted context omitted.
Do you think for something to be a JIT it must only compile code immediately before it's used? In that case the only real JIT I know of is basic-block-versioning. I think almost all JITs will compile branches or methods to some extent before they are actually needed. Yours is probably not a reasonable definition therefore. I think a JIT is just a compiler that can compile as the program is running.
> Do you think for something to be a JIT it must only compile code immediately before it's used? I mean, that's more or less what the name "just-in-time compiler" implies. I'm aware that the name is not necessarily a precise definition, but I'm not sure how far the definition stretches. Does JIT have a precise agreed-upon definition, or is it somewhat more vaguely defined?
Re: Firefox’s new streaming and tiering compiler
#110Earlier quoted context omitted.
> Do you think for something to be a JIT it must only compile code immediately before it's used? I mean, that's more or less what the name "just-in-time compiler" implies. I'm aware that the name is not necessarily a precise definition, but I'm not sure how far the definition stretches. Does JIT have a precise agreed-upon definition, or is it somewhat more vaguely defined?
No these terms never have precise meanings, and trying to debate them too much doesn't achieve much. But if your definition doesn't actually work for any examples of the thing you're defining at all except one then it's probably wrong.