Skip to content

[WIP] implement slice-by-4 with SIMD instructions, take 2#26

Open
Touffy wants to merge 3 commits intomasterfrom
async-load-simd
Open

[WIP] implement slice-by-4 with SIMD instructions, take 2#26
Touffy wants to merge 3 commits intomasterfrom
async-load-simd

Conversation

@Touffy
Copy link
Owner

@Touffy Touffy commented Jul 19, 2021

This is an alternate version of client-zip with SIMD-enabled CRC32, where the basic algorithm is loaded synchronously as before, and the optimised version can be swapped in later from an external WASM file.

pros :

  • downloadZip is still immediately usable after importing
  • failing to load the new WASM file for any reason will not break anything
  • the new WASM can be safely swapped in while downloadZip is running !
  • no base64 encoding for the larger WASM (avoids the large, ugly string in the source code)

cons :

  • users may forget to call useSimd, or to host the WASM file in the right place
  • useSimd itself takes up a few hundred bytes (though less than the whole WASM)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

1 participant