A fast HashSet implementation

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
InfluxDB high-performance time series database
Collect, organize, and act on massive volumes of high-resolution data to power real-time intelligent systems.
influxdata.com
featured
  1. Go-Utils

    Some parallel and less known but good data structure

    HashSet is a hash set implementation based on the open-addressing algorithm hopscotch hashing. The motivation for using HashSet[E comparable] over using type Set[E comparable] map[E]struct{} is mainly due to the improved speed and memory usages. It uses internal hash functions exported from runtime. Originally, I used hash/maphash, but this proved to be very slow(at least on my end) compared to the private hash functions used by native map in package runtime.

  2. CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  3. go

    The Go programming language

    I recommend writing more thorough benchmarks as in https://github.com/golang/go/blob/master/src/runtime/map_benchmark_test.go. Currently your implementation only benchmarks the basic cases -- which, of course, is fine if that's all the cases you need to support. If you mention a disadvantage, then I would expect to see that in the benchmark.

  4. golangci-lint

    Fast linters runner for Go

    All of this is nitpicking really, but I would suggest using linters, e.g. https://github.com/golangci/golangci-lint - sometimes annoying, but mostly just helps to avoid discussions like this (and plethora of bugs).

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

  • Go 1.20 released

    3 projects | /r/golang | 1 Feb 2023
  • why do you think the experience of writing Rust is better than writing Go?

    4 projects | /r/rust | 5 Aug 2022
  • Why are enums not a thing in Go?

    5 projects | /r/golang | 22 May 2022
  • Go 1.18 - 7 issues remain - only 2 actual bugs! Are you excited? I'm excited.

    5 projects | /r/golang | 9 Mar 2022
  • Go'ing Insane Part Three: Imperfect Interfaces

    3 projects | /r/golang | 17 Sep 2021

Did you know that Go is
the 4th most popular programming language
based on number of references?