wasmi
wasmi copied to clipboard
Implement Wasm proposal: `simd128`
Implementing the simd128 Wasm extension in wasmi would enable us to build smart contracts with this extension, resulting in overall smaller contract sizes.
I've built the ink! example contracts with simd128 on an experimental branch here.
We would gain size reductions for basically all contracts, most noteworthy are contracts which have more complex storage and logic:
| Example | master |
simd128 |
|---|---|---|
delegator |
10.7 K | 9.1 K |
dns |
24.97 K | 21.7 K |
erc20 |
30.1 K | 27.3 K |
I would have liked to run the comparison with multivalue as well, but a bug in rustc currently prevents this.
With https://github.com/paritytech/wasmi/pull/346 merged we are one step closer to implementing this.
I am going to close this issue since I don't think we should have SIMD support in wasmi.
Those 10% saving in Wasm file sizes would not really solve our Wasm file size problems in ink! and contracts-pallet.
Beyond that this Wasm proposal alone adds so many new Wasm operators that I am sure we do not want to include all of them to our gas cost model.
Another fear is that those many new Wasm operators and the additional V128 value type will slow down the rest of the wasmi interpreter significantly.
Closing this in accordance with @athei .