s0l0ist / node-seal

Homomorphic Encryption for TypeScript or JavaScript - Microsoft SEAL

Home Page:https://s0l0ist.github.io/node-seal/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Actual SIMD utilization?

ibsusu opened this issue · comments

Heya, I understand that you're working on this with SIMD in mind so considering that SIMD is coming to webassembly in Chrome and Firefox are you going to implement it or has it already been done?

https://www.chromestatus.com/feature/6533147810332672

@ibsusu, the comments for almost all the functions/properties are taken from the SEAL source code.

SEAL has support for SIMD, but there are no direct modifications to the SEAL source that have been optimized for WASM SIMD. Instead, any WASM SIMD optimization is done by the compiler (emscripten) by providing the -msimd128 flag. However, enabling the flag -msimd128 causes the library to be slower for several HE functions. I have not identified the root cause, but I suspect some answers reside in clang.h.

Because of this bug, I don't ship a SIMD build.

I wish I saw the reply earlier, do you think it would be worth it to run the benchmarks on a canary build of chrome?