Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.
hasansinoPublic archive

About

Performance friendly array intersections

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

Repository files navigation

Go Report Card Build Status

go-intersect

Simple array intersection using hash maps.

Installation

go get -u github.com/hasansino/go-intersect

Usage

var (
    a = []int64{1,2,3}
    b = []int64{3,5,6}
)

c := intersect.Int64(a, b)

Two methods are available: String() and Int64()

Performance

goos: linux
goarch: amd64
pkg: github.com/hasansino/go-intersect
BenchmarkInt64-8    	 3070972	       370 ns/op	      64 B/op	       1 allocs/op
BenchmarkString-8   	  829771	      1382 ns/op	     451 B/op	       2 allocs/op

About

Performance friendly array intersections

Topics

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages