Replies: 2 comments 1 reply
-
Overall I don't think WASM compiler wins big. One compiler project to win big: revive the statement based compiler so we compile block/tagbody to labeled break/continue instead of try/catch. Another one: type inference. Maybe based on the famous Henry Baker paper. |
Beta Was this translation helpful? Give feedback.
-
I haven’t looked into it at low level but I think that is what reference types solve though. JS is super fast. At work I usually experience a 2x speed up at most with very C like code in web assembly vs C like code in JS. For sure not ground breaking. I would like to understand better where most of the JSCL performance penalty come from. Type checks ? Too many dynamic calls ? It’s hard to figure out with such a large jscl.js. This would be a good project. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Half joking I used claude to generate a basic wasm compiler with GC and ref types to be able to interact with existing JS side:
It makes me wonder if that is a direction worth considering longer term. It'd gain performance, fixnums. Probably it'd make FFI slower.
wasm doesn't support goto. So tagbody and such would still need some reconstruction work rebuild structures when possible from a set of gotos.
If we were to write a new compiler, would this be a good choice? or would you stick to JS?
I don't think I'll have the time to do this properly myself. But I could help experiment and setup some infrastructure for it.
Beta Was this translation helpful? Give feedback.
All reactions