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

as-blake

v0.1.1

Published

Portable, SIMD-accelerated BLAKE3 for AssemblyScript - SWAR and degree-4 SIMD, dispatched at compile time.

Readme

Portable BLAKE3 for AssemblyScript, with a 128-bit Wasm SIMD fast path for large inputs and a compact SWAR fallback for non-SIMD builds.

as-blake exposes BLAKE-family one-shot hashing, raw pointer hashing, keyed hashing, key derivation, and incremental streaming. When compiled with --enable simd, large messages use degree-4 SIMD: four BLAKE3 chunks are compressed in parallel inside one v128.

Install

npm install as-blake

Compile with SIMD for the fast path:

asc assembly/index.ts --enable simd --enable bulk-memory

Compile without SIMD for a SWAR-only binary:

asc assembly/index.ts --enable bulk-memory

The package asconfig.json enables SIMD and bulk memory by default.

Usage

import { blake3 } from "as-blake";

const digest = blake3.hash(data); // ArrayBuffer -> 32-byte ArrayBuffer

For hot paths, write into a caller-owned output buffer:

import { blake3 } from "as-blake";

blake3.hashUnsafe(inPtr, inLen, outPtr); // writes 32 bytes at outPtr

Incremental hashing uses Hasher:

import { blake3 } from "as-blake";

const h = new blake3.Hasher();
h.update(ptr0, len0);
h.update(ptr1, len1);
h.finalize(outPtr);

API

hash(data: ArrayBuffer): ArrayBuffer;
hashUnsafe(inPtr: usize, inLen: usize, outPtr: usize): void;
hashSWAR(inPtr: usize, inLen: usize, outPtr: usize): void;
hashKeyed(keyPtr: usize, inPtr: usize, inLen: usize, outPtr: usize): void;
deriveKey(
  contextPtr: usize,
  contextLen: usize,
  materialPtr: usize,
  materialLen: usize,
  outPtr: usize,
): void;

class Hasher {
  static create(): Hasher;
  static createKeyed(keyPtr: usize): Hasher;
  static createDeriveKey(contextPtr: usize, contextLen: usize): Hasher;
  update(ptr: usize, len: usize): void;
  finalize(outPtr: usize): void;
}

Notes:

  • hash allocates and returns a 32-byte digest.
  • hashUnsafe, hashKeyed, and deriveKey write a 32-byte digest to outPtr.
  • hashKeyed expects a 32-byte key at keyPtr.
  • hashSWAR forces the non-SIMD path even in a SIMD build.
  • One-shot scratch-backed functions are not reentrant. Use Hasher for independent concurrent instances.
  • Inputs are raw (ptr, len) pairs into little-endian Wasm memory.

Performance

Throughput at 1 MiB on an AMD Ryzen 7800X3D:

| runtime | SWAR | SIMD | speedup | | --- | ---: | ---: | ---: | | V8 | 845 MB/s | 1926 MB/s | 2.3x | | WAVM | 957 MB/s | 2954 MB/s | 3.1x | | wazero | 896 MB/s | 1369 MB/s | 1.5x |

The SIMD path uses a degree-4 kernel above 4 KiB and a degree-2 kernel in the 2-4 KiB range. Smaller inputs use the SWAR stream.

Development

npm install
npm test
npm run verify

Run benchmarks:

npm run bench -- blake3-swar
npm run bench -- blake3-simd
npm run bench:summary

Optional runtime-specific benchmarks:

npm run bench -- --wavm blake3-simd
npm run bench -- --wazero blake3-simd

License

This project is distributed under an open source license. Work on this project is done by passion, but if you want to support it financially, you can do so by making a donation to the project's GitHub Sponsors page.

You can view the full license using the following link: License

Contact

Please send all issues to GitHub Issues and to converse, please send me an email at [email protected]