forked from WebAssembly/spec
-
Notifications
You must be signed in to change notification settings - Fork 3
Closed
Description
I wanted to extract the proposal from here to a separate issue to avoid getting lost too much in that thread. Specifically it seems worthwhile to me to evaluate new addition/subtraction instructions:
i64.add_wide: [i64, i64] -> [i64, i64] ;; a + b -> (low, high=carry)
i64.add3_wide: [i64, i64, i64] -> [i64, i64] ;; a + b + c -> (low, high=carry)
i64.sub_wide: [i64, i64] -> [i64, i64] ;; a - b -> (difference, borrow)
i64.sub2_wide: [i64, i64, i64] -> [i64, i64] ;; a - b - c -> (difference, borrow)
(names bikesheddable over time of course)
My thinking for evaluating this would be:
- Implement them in a fork of wasm-tools (not too bad).
- Implement them in Wasmtime (probably not too bad).
- Implement them in LLVM (pretty nontrivial for me) under a new flag temporarily.
- Evaluate performance of instructions before+after, only before, only after, etc.
Much of the performance here will probably related to how good the LLVM implementation is would be my guess. To be determined!
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels