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

feat: add benchmarks #89

Merged
merged 12 commits into from
Nov 22, 2023
Merged

Conversation

miparnisari
Copy link
Contributor

Addresses #24

@miparnisari
Copy link
Contributor Author

miparnisari commented Nov 22, 2023

Regarding error undefined: atomic.Bool (typecheck)

I don't see atomic.Bool defined in https://pkg.go.dev/sync/atomic@go1.18#pkg-types

How is this repo building at all? 🤔

EDIT: Updated to 1.19

@karlseguin
Copy link
Owner

Can the .idea folder be removed (possibly added to your .git/info/exclude), or if you think it's worthwhile to add for everyone, then .gitignore.

I think cover.out should also be excluded (make c used to remove the file)

@miparnisari miparnisari force-pushed the add-benchmarks branch 7 times, most recently from b490ee8 to d337460 Compare November 22, 2023 05:54
@miparnisari
Copy link
Contributor Author

miparnisari commented Nov 22, 2023

@karlseguin i wrote the basic cases but i feel like we need more to cover more configuration scenarios. For example the number of buckets. The default is 16 but what if I set 1000, what should the effect be? More speed but more memory?

@karlseguin karlseguin merged commit 9c2ca78 into karlseguin:master Nov 22, 2023
3 checks passed
@karlseguin
Copy link
Owner

I think the next step would be to add some degree of concurrency, which is where the number of buckets would have an impact. More buckets will improve performance up to a point, at the cost of more memory. I'm not really sure how well Go's benchmark are for this type of more complex benchmark where you aren't just testing 1 narrow behavior though.

(A few uncommon operations, e.g. ItemCount, `DeletePrefix, are O(N) on the number of buckets, but I don't think these are worth worrying about too much).

@miparnisari
Copy link
Contributor Author

@karlseguin why didn't you do a squash and merge? The git commit history looks horrible 😭 Can you fix it and force push?
image

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.

2 participants