Skip to content

Conversation

@juanli16
Copy link
Contributor

Add Shuffle function, and test. After running some benchmark between math/rand Shuffle and math/rand/v2 Shuffle, v2 is always slightly faster:

go test -bench=. -v
=== RUN   TestPAIR
--- PASS: TestPAIR (0.00s)
goos: darwin
goarch: arm64
pkg: github.com/optable/match/pkg/pair
BenchmarkShuffleV1
BenchmarkShuffleV1-12    	     100	  11770306 ns/op
BenchmarkShuffleV2
BenchmarkShuffleV2-12    	     105	  11376890 ns/op
PASS
ok  	github.com/optable/match/pkg/pair	7.117s

@juanli16 juanli16 merged commit f600d47 into main Aug 30, 2024
@juanli16 juanli16 deleted the pair-add-shuffle branch August 30, 2024 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants