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

github.com/cespare/mph

Package Overview
Dependencies
Alerts
File Explorer
Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github.com/cespare/mph

  • v0.1.0
  • Source
  • Go
  • Socket score

Version published
Created
Source

mph

Go Reference

mph is a Go package for that implements a minimal perfect hash table over strings. It uses the "Hash, displace, and compress" algorithm and the Murmur3 hash function.

Some quick benchmark results (this is on an i7-8700K):

  • Build constructs a minimal perfect hash table from a 102k word dictionary in 18ms (construction time is linear in the size of the input).

  • Lookups on that dictionary take about 30ns and are 27% faster than a map[string]uint32:

    BenchmarkTable-12               199293806               29.99 ns/op
    BenchmarkTableMap-12            145449822               40.92 ns/op
    

FAQs

Package last updated on 01 Sep 2021

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