• Stars
    star
    435
  • Rank 100,085 (Top 2 %)
  • Language
    Go
  • License
    Apache License 2.0
  • Created almost 2 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Golang port of Abseil's SwissTable

SwissMap

SwissMap is a hash table adapated from the "SwissTable" family of hash tables from Abseil. It uses AES instructions for fast-hashing and performs key lookups in parallel using SSE instructions. Because of these optimizations, SwissMap is faster and more memory efficient than Golang's built-in map. If you'd like to learn more about its design and implementation, check out this blog post announcing its release.

Example

SwissMap exposes the same interface as the built-in map. Give it a try using this Go playground.

package main

import "github.com/dolthub/swiss"

func main() {
	m := swiss.NewMap[string, int](42)

	m.Put("foo", 1)
	m.Put("bar", 2)

	if x, ok := m.Get("foo"); ok {
		println(x)
	}
	if m.Has("bar") {
		x, _ := m.Get("bar")
		println(x)
	}

	m.Put("foo", -1)
	m.Delete("bar")

	if x, ok := m.Get("foo"); ok {
		println(x)
	}
	if m.Has("bar") {
		x, _ := m.Get("bar")
		println(x)
	}
}
1
2
-1

Program exited.

More Repositories

1

dolt

Dolt – Git for Data
Go
17,645
star
2

go-mysql-server

A MySQL-compatible relational database with a storage agnostic query engine. Implemented in pure Go.
Go
2,310
star
3

doltgresql

DoltgreSQL - Version Controlled PostgreSQL
Go
1,030
star
4

maphash

Go
76
star
5

jsplit

A Go program to split large JSON files into many jsonl files
Go
54
star
6

doltpy

A Python API for Dolt
Python
53
star
7

data-analysis

Jupyter Notebook
43
star
8

pg2mysql

Script to convert Postgres dump files to MySQL dump files
Shell
38
star
9

dolthub-etl-jobs

ETL jobs that DoltHub maintained that load public data into DoltHub.
Python
17
star
10

dolthub-cypress

A suite of Cypress tests that runs against DoltHub (dolthub.com)
TypeScript
14
star
11

driver

Golang database/sql driver for Dolt
Go
12
star
12

bounties

Go
9
star
13

doltcli

Python
8
star
14

go-icu-regex

ICU Regular Expressions in Go
Go
8
star
15

docs

Shell
7
star
16

aws-incident-manager-oncall-calendar-generator

Go
7
star
17

grammar-crawler

Java
6
star
18

dolt-action

Shell
6
star
19

dolthub-issues

Issues for dolthub.com
4
star
20

doltlab-issues

Issue tracking for DoltLab
4
star
21

kedro-dolt

Kedro-Dolt Hook Plugin
Python
4
star
22

react-library

A React library of general-use components, hooks, contexts, and utilities
TypeScript
3
star
23

fuzzer

Fuzzer for Dolt repositories
Go
3
star
24

gsheets-to-csv

Python
3
star
25

dolt-integrations

Python
3
star
26

chat-bot-profanity-filter

Simple chat bot with a profanity filter built with data from https://www.dolthub.com/repositories/Liquidata/bad-words
Python
3
star
27

efcore-sample

Sample project using .NET Entity Framework Core to access a Dolt database
C#
2
star
28

insert-batcher

Go
2
star
29

release-notes-generator

Automated release notes generation for GitHub project releases
Perl
2
star
30

go-library-sample

This is a sample C++ application showing how to embed a Go library into C/C++
Go
2
star
31

hosted-issues

Issues for hosted.doltdb.com
2
star
32

windows-msi-creator

One stop shop for creating Windows MSI binaries for Dolt releases.
Batchfile
1
star
33

dolt-wordpress

Wordpress plugin w/ Dolt
1
star
34

ai-dungeon-scraper

Python
1
star
35

read-replication-demo

Shell
1
star
36

query-faq-toy

Go
1
star
37

hosted-cypress

A suite of Cypress tests that runs against Hosted DoltDB (hosted.doltdb.com)
TypeScript
1
star
38

dolt-dotnet-webapp-sample

A sample application showing how to use Dolt from a .NET web application with Razor pages.
C#
1
star
39

cold-marketing

cold email marketing emails
1
star
40

dolt-rest-example

Python
1
star
41

gsheets-sync-demo

1
star
42

label-customer-issues

A GitHub Action to apply a label to issues and PRs created by authors who are not members of the team that owns a repo.
JavaScript
1
star
43

dolt-diesel-getting-started

Rust
1
star