Bug 1597790 Comment 2 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> I had a version of a patch to do this by adding a Scalar::Int128, and extending wasmLoad/Store to utilize this. It was a bit hacky, and didn't fit at all with the baseline compiler (which uses ValueType for the stack). 

Since we have Scalar::Simd128, we could just partially enable ENABLE_WASM_SIMD fragments. Though it becomes too complicated and adds overhead just for copy/fill when ENABLE_WASM_SIMD is off. The patch enables inlining with SIMD ops only when ENABLE_WASM_SIMD is on.

I did some microbenchmarking (attaching test):

||	before	| after | |
|---|---|---|---|
|ion aligned	| 1921	| 1315	| 46.06% |
|ion unaligned	| 2086	| 1475	| 41.42% |
|baseline aligned	| 2078	| 1504	| 38.16% |
|baseline unaligned	| 2158	| 1634	| 32.06% |
> I had a version of a patch to do this by adding a Scalar::Int128, and extending wasmLoad/Store to utilize this. It was a bit hacky, and didn't fit at all with the baseline compiler (which uses ValueType for the stack). 

Since we have Scalar::Simd128, we could just partially enable ENABLE_WASM_SIMD fragments. Though it becomes too complicated and adds overhead just for copy/fill when ENABLE_WASM_SIMD is off. The patch enables inlining with SIMD ops only when ENABLE_WASM_SIMD is on.

I did some microbenchmarking on x64 (attaching test):

||	before	| after | |
|---|---|---|---|
|ion aligned	| 1921	| 1315	| 46.06% |
|ion unaligned	| 2086	| 1475	| 41.42% |
|baseline aligned	| 2078	| 1504	| 38.16% |
|baseline unaligned	| 2158	| 1634	| 32.06% |

Back to Bug 1597790 Comment 2