Live data from Hacker News

Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

twitter.com

101–106 of 106 posts

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#101
post #46

Earlier quoted context omitted.

I worked on one as an undergrad: https://github.com/gwsystems/aWsm Full AoT compilation, C programs run within 10% of native

10% difference from native, or 10% of native performance?

10% worse performance. Not 10x worse :D

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#102
post #46

Earlier quoted context omitted.

I worked on one as an undergrad: https://github.com/gwsystems/aWsm Full AoT compilation, C programs run within 10% of native

Since it compiles using llvm, what's the reason for the discrepancy? Lost information about e.g. aliasing?

Bounds checking, dynamic dispatch is more expensive, wasm semantics have no undefined behavior to exploit for optimizations. And there is bloat in the process. I’m sure losing information effects things as well

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#103
post #94

What is the state of the world with wasm at this point? It seems like it's been this huge tease for 10 years now, promising that we'll be able to build web apps in any language. But as far as I'm aware, garbage collection and DOM access is still nonexistent.

Funny story, in 2013 I was working for the Google Earth team. A new clean slate version of Google Earth was in the works (which has been released since) and this was at the time that wonderful demos were being made with asm.js I convinced one of the engineers to try compiling it in emscripten. It was a total success, running at 45 fps. The middle manager got so excited about this that he decided to make a full push f…

Lol! The funny thing is that at that point, the code you were shipping was "just javascript" but in a machine generated format. When places go out of their way to tell you about their engineering culture, they often aren't.

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#104

Earlier quoted context omitted.

An AOT compiler would do a one-time translation to a platform-specific binary. If the environment you run on doesn’t support JIT compilation (iOS for example), AOT compiling WASM is useful.

At that point, what's the purpose of using WASM at all?

Control Flow Integrity, https://en.wikipedia.org/wiki/Control-flow_integrity

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#105

Earlier quoted context omitted.

Flutter is a UI framework on top of a low level programming framework, Dart. Sort of like UIKit and Cocoa.

I think you're thinking of Skia. Dart is a language.

Turtles all the way down! It would be more humorous if we used Skia, since that arguably fulfill's OPs proposition that someone would eventually rewrite the browser in said framework

Re: Wasm3 compiles itself (using LLVM/Clang compiled to WASM)

#106
post #42

Earlier quoted context omitted.

Good question, still a "green" technology but I have had great successes with it for the past 4-5 years in production (ASM.JS before widespread WASM compatibility). "promising that we'll be able to build web apps in any language" is not how I see WASM, nor is it really used in this way outside of transpiling Unity3D/Unreal games (this may be the one area there is an exception). I use it to transpile C++ to WASM libra…

> "promising that we'll be able to build web apps in any language" is not how I see WASM Unfortunately it kind of got branded this way for people who aren't close to the front-end industry. There's a segment out there who would like to write web apps but aren't willing to touch JavaScript with a ten-foot pole, and their hopes were gotten up that WASM would give them that. It's not exactly a lie, but it has so many as…

Blazor client-side (for dotnet) works fine with minimal asterisks, and even those issues are being slowly solved as WASM evolves with multithreading, GC, and DOM access.
Post reply on HN