npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

blake3-jit

v1.0.0

Published

The pure JavaScript BLAKE3 implementation with runtime WASM SIMD

Readme

blake3-jit

CI

High-performance BLAKE3 implementation with runtime JIT WASM SIMD.

Features

  • 1.38 GB/s peak throughput on large inputs
  • Pure JS + JIT WASM SIMD - no .wasm files to ship
  • All BLAKE3 modes: hash, keyed (MAC), derive_key
  • XOF (eXtendable Output Function) support
  • Zero dependencies, tree-shakeable

Installation

npm install blake3-jit

Usage

import { hash, createHasher, createKeyed, createDeriveKey } from 'blake3-jit';

// One-shot hashing
const digest = hash(new Uint8Array([1, 2, 3]));

// Incremental hashing
const hasher = createHasher();
hasher.update(chunk1);
hasher.update(chunk2);
const result = hasher.finalize();

// Keyed hashing (MAC)
const mac = createKeyed(key).update(message).finalize();

// Key derivation
const derived = createDeriveKey("my-app v1").update(material).finalize(32);

API

One-shot Functions

hash(input: Uint8Array, outputLength?: number): Uint8Array
hashInto(input: Uint8Array, output: Uint8Array, outputLength?: number): void

Incremental Hashing

createHasher(): Hasher
createKeyed(key: Uint8Array): Hasher    // 32-byte key for MAC
createDeriveKey(context: string): Hasher // Key derivation

class Hasher {
  update(data: Uint8Array): this
  finalize(outputLength?: number): Uint8Array
  finalizeXof(): XofReader
}

class XofReader {
  read(length: number): Uint8Array
}

SIMD Control

warmupSimd(): boolean  // Pre-initialize WASM SIMD

Architecture

blake3-jit
├── JS Path (<4KB)      Pure JavaScript, SMI-optimized compress
└── WASM SIMD (>=4KB)   4-way parallel, JIT-generated at runtime
    ├── compress4x      Single block x 4 chunks
    ├── compressChunks4x 16 blocks x 4 chunks batched
    └── compressParent   Merkle tree merges

Key optimizations:

  • SMI variables force V8 32-bit integer ALU
  • Arena pattern: all buffers in WASM linear memory (zero GC)
  • Runtime WASM codegen eliminates .wasm file dependency

Benchmarks

Compared against native Rust (@napi-rs/blake-hash):

| Size | blake3-jit | @napi-rs | Notes | | ---- | ---------- | --------- | --------------- | | 96B | 362 MB/s | 149 MB/s | 2.4x faster | | 512B | 748 MB/s | 521 MB/s | 1.4x faster | | 1KB | 811 MB/s | 701 MB/s | 1.2x faster | | 32KB | 1.36 GB/s | 1.97 GB/s | native wins | | 1MB | 1.38 GB/s | 2.06 GB/s | native wins |

Pure JS beats native Rust for small inputs due to FFI overhead.

License

MIT