Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

switch to non reflect/generics slices.Sort() for 56% speed improvement #14

Merged
merged 1 commit into from
Mar 24, 2023

Conversation

ldemailly
Copy link
Member

switch to non reflect/generics slices.Sort() for 56% speed improvement in sets.Sort

// sort.Slices (reflect) - before
BenchmarkSetSort1000-10        16862         70937 ns/op        8248 B/op          3 allocs/op
// slices.Sort - after
BenchmarkSetSort1000-10        26198         45288 ns/op        8192 B/op          1 allocs/op

@codecov
Copy link

codecov bot commented Mar 24, 2023

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (b133bfa) 100.00% compared to head (a6bdbaa) 100.00%.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #14   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            1         1           
  Lines          122       122           
=========================================
  Hits           122       122           
Impacted Files Coverage Δ
sets.go 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@ldemailly ldemailly merged commit 95677d6 into main Mar 24, 2023
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.

1 participant