Faster string keyed maps in Go

This page summarizes the projects mentioned and recommended in the original post on /r/golang

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • faststringmap

    A fast (5x) string keyed read-only map for Go - particularly good for keys using a small set of nearby runes.

  • We were using Go map[string]int to validate the strings and obtain the index in the list. However the map lookups were consuming a lot of compute time. I wondered whether this could be significantly reduced. I looked around and didn't immediately find anything. So I came up with https://github.com/sensiblecodeio/faststringmap which gave us a 5x performance improvement on map lookups and a 25% reduction in overall CSV processing time.

  • countwords

    Discontinued Playing with counting word frequencies (and performance) in various languages.

  • This article shows that map lookups can be optimized by using the (unintuitive) pattern:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts