Giter Club home page Giter Club logo

Comments (4)

connor4312 avatar connor4312 commented on August 18, 2024 2

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.

oconnor663 avatar oconnor663 commented on August 18, 2024

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.

Brooooooklyn avatar Brooooooklyn commented on August 18, 2024

I'll update the benchmark result, thanks for your explanation.

from blake3.

CumpsD avatar CumpsD commented on August 18, 2024

@connor4312 trying to understand your reply.

Which version exactly has the native bindings?

from blake3.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.