Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

alucha

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

alucha

Immutable hash maps implemented as hash array papped tries

  • 0.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
decreased by-77.14%
Maintainers
1
Weekly downloads
 
Created
Source

alucha

Hash Array Map Trie (HAMT) implementation based on CHAMP paper and inspired by Clojure. Library provides a builder API inspired by clojure transients that can be utilized for bulk updates.

Name

I wanted to call this library maple, but that name seems to be taken so I chose to call it Alucha instead, which is a type of (most delicious) plum tree.

Status

Prototype implements hash-array map tries (HAMT) by synthesizing CHAMP algorithm with HAMTs used by IPFS UnixFS and IPLD HAMT. CHAMP algorithm utilized several optimizations that are incompatible with IPFS UnixFS and IPLD HAMT, this implementation attempts to utilize those optimizations at runtime and provide a way to map it to IPFS UnixFS compatible representation.

Optimizations

CHAMP algorithm exploits branching factor of 32 because it can be manipulated efficiently on 32-bit processors. It also allows storing HAMT bitmaps in a single integer.

In order to support IPFS UnixFS implementation (which uses 256 factor by default) branching factor is configurable, but relevant optimizations only apply when branching factor of 32 is used.

It is also worth noting that even with branching factor of 32 it can store large amount of entries in a relatively shallow tree e.g. tree 6 levels deep could store around 33,554,432 entries.

Credits

Keywords

FAQs

Package last updated on 25 Oct 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc