Skip to content

src: enable SIMD support for buffer swap

Rodrigo Muino Tomonari requested to merge github/fork/lucshi/simd-swap into main

This patch is modified from https://github.com/nodejs/node/pull/44578 after review comments accepted.

Comments -> solution Patch is too big that add a deps folder -> I made all the code changes into the util-inl.h file, and did not touch any other folders and files. Patch only adopted AVX512 Simd instruction which is not widespread -> I enabled ssse version and AVX512 version at the same time. So that all popular platforms can benefit from this patch. Most of known platforms support ssse Do not modify the gyp file -> I removed all code changes in gyp file, and uses attribute in the source code file like deps/zlib does.

For all platforms, the most performance gains is >5X.

For the platforms supporting AVX512, it achieved best performance gain, the charts for comparison as below: image For the platforms supporting SSE only, it also achieved good performance, charts as below: image

Merge request reports

Loading