Settings

Theme

WebAssembly Dark Corners: Control Flow

eqrion.net

3 points by eqrion · 3 comments

Reader

1 thread
torutofu

Wasm’s structured blocks are a nice constraint, but irreducible CFGs are where the compiler has to choose between cloning code and introducing a dispatcher.

  • eqrionOP

    Yeah, and one thing that has been unclear to the WebAssembly CG is what is the performance and binary size impact of not allowing irreducible code. People can write microbenchmarks that show an impact, but we don't have great real world data.

    So right now it's not a priority to fix. But the door is open to allowing it in the future.

    • torutofu

      Feels like the useful benchmark would measure code size and i-cache effects together, since a bit of block cloning could beat a dispatcher until larger hot loops flip that tradeoff.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection