Comments (4)
Nice work. By the way the reason you see a large speed difference in your version is the latest version of blake3 lacks Node 16 native Neon bindings, so you're actually testing the wasm version which is indeed much slower.
Initially there was build issues with npm in Node 15 that included the ABI version 16 uses. It seems that's now resolve, and although wasm-pack recently broke (rustwasm/wasm-pack#1079) tha can be fixed with a downgrade.
Anyway, with a bumped up version of blake3 (both this module and the source crate) performance is quite comparable:
Running "digest big file blake3" suite...
Progress: 100%
blake3-napi:
6 740 ops/s, ±1.30% | fastest
blake3-neon:
6 655 ops/s, ±1.54% | slowest, 1.26% slower
Finished 2 cases!
Fastest: blake3-napi
Slowest: blake3-neon
from blake3.
My understanding is that both libraries are bindings for the same Rust library. Is it possible that the benchmark wasn't testing them in the same configuration? Or is there a real performance difference to do with e.g. performing fewer memory copies?
Oh my mistake, I think I misinterpreted the benchmark figures. Ignore me.
from blake3.
I'll update the benchmark result, thanks for your explanation.
from blake3.
@connor4312 trying to understand your reply.
Which version exactly has the native bindings?
from blake3.
Related Issues (20)
- Threading support in native Node HOT 1
- Node 14 is not supported HOT 4
- Possibly incorrect wording in `hash` documentation? HOT 1
- Error trying to import bindings in Dockerfile HOT 1
- nodejs importing wasm HOT 2
- Online demo gives incorrect value
- Parcel compatibility
- Is this actively maintained? HOT 1
- Access the Merkle tree
- blake3-wasm v2.1.7 for npm
- Module did not self-register HOT 1
- Problem during using npm i HOT 1
- Trying to use Blake3 in React with TS. Build Warnings and Runtime Errors HOT 2
- readme.md is incomplete for non webpack browser
- Can't install any of the blake3 packages via npm HOT 6
- Browser can't access WASM
- WASM Streaming compile failure on mobile devices
- npm install [email protected] — >> npm ERR! code ETARGET !!! >> npm ERR! notarget No matching version found for [email protected].
- Module not found: Error: Can't resolve './node.js' in '<project-path>/node_modules/blake3/esm'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blake3.