JWebAssembly icon indicating copy to clipboard operation
JWebAssembly copied to clipboard

function inline

Open Horcrux7 opened this issue 4 years ago • 4 comments

The current compiler of Wasm code to native machine code does not have optimizing like the JIT in Java. This means there is no code optimizing like the inline of functions. That JWebAssembly must already do this function inline at creating of the Wasm file.

Code samples that should JWebAssembly should optimize are welcome.

Horcrux7 avatar Jul 13 '19 18:07 Horcrux7

It could piggiback on this tool, used by a lot of the compilers. https://github.com/WebAssembly/binaryen

There is a wasm to wasm optimizer in there.

Frontrider avatar Sep 07 '20 02:09 Frontrider

#9 may be related.

Frontrider avatar Sep 07 '20 02:09 Frontrider

Yes, this tool can show some optimization. But I think this tool does not know any over the original program. The optimization will be limited.

Horcrux7 avatar Sep 07 '20 19:09 Horcrux7

Welp. I hope it still matters for something. It can also have an interesting side effect where you could use this tool as a java to javascript transpiler, by going through webassembly.

Frontrider avatar Sep 09 '20 11:09 Frontrider