Closed Bug 1755721 Opened 2 years ago Closed 2 years ago

x64/x86: Improve encoding of SIMD float min/max operations using AVX

Categories

(Core :: JavaScript: WebAssembly, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED
99 Branch
Tracking Status
firefox99 --- fixed

People

(Reporter: yury, Assigned: yury)

References

Details

Attachments

(2 files)

Currently our minMaxFloat64x2 and minMaxFloat32x4 methods are too "heavy". They generate about 22 instructions (7 are just regular moves). Some of OR/AND operations make functionality of BLENDV instruction. It is expected to reduce amount of instructions by 50% by using VEX encoding and VBLENDVx

Attachment #9264174 - Attachment description: WIP: Bug 1755721 = Improve SIMD min/max using AVX → WIP: Bug 1755721 - Improve SIMD float min/max using AVX

Nice...

Attached file test_f32x4_minmax.js

Macrobenching of f32x4.min+f32x4.max shows that with AVX improves performance by 25% in generic case (with NaN) and by 19% when input data has no NaNs. The amount of instructions decreased by 53, and gives 100 bytes back.

Attachment #9264174 - Attachment description: WIP: Bug 1755721 - Improve SIMD float min/max using AVX → Bug 1755721 - Improve SIMD float min/max using AVX
Attachment #9264174 - Attachment description: Bug 1755721 - Improve SIMD float min/max using AVX → Bug 1755721 - Improve SIMD float min/max using AVX. r=jseward
Pushed by ydelendik@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/c6f1243c3ba4
Improve SIMD float min/max using AVX. r=jseward
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 99 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: