Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

feat: add xxhash wasm impl #344

Merged
merged 2 commits into from
Oct 31, 2022
Merged

feat: add xxhash wasm impl #344

merged 2 commits into from
Oct 31, 2022

Conversation

tjjfvi
Copy link
Contributor

@tjjfvi tjjfvi commented Oct 31, 2022

This replaces the old JS-based xxhash implementation with a WASM implementation (hand-written in WAT) that is, according to my benchmarks, 2×–100× faster (depending on how it's called).

I added a build:wasm task, which transforms the WAT to WASM and copies the WASM into a TS file so as to be portable. This currently isn't run on CI or anything; as it only needs to be run when the WAT is updated (which should be relatively rare), I don't think this is essential. The task requires the wat2wasm tool from WABT.

@tjjfvi tjjfvi requested a review from harrysolovay as a code owner October 31, 2022 15:56
@tjjfvi tjjfvi merged commit ed2992e into main Oct 31, 2022
@tjjfvi tjjfvi deleted the xxhash-wasm branch October 31, 2022 16:08
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants