-
Notifications
You must be signed in to change notification settings - Fork 122
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
Add benchmarks #24
Comments
Good idea. I'll try to get to it at some point, but I'd also accept a PR in the meantime. |
@karlseguin i'm happy to send a PR but i would need some guidance. What kind of benchmarks would be useful? |
@miparnisari I'm not 100% sure. The cache is relatively feature rich and has a number of configuration knobs. But, the fundamental operations are Both
Finally, the last major thing to consider is GC pressure. Some people are going to run the cache with very little GC pressure (it's almost used like a lazy-loading hashtable). Some people with run the cache with a bit -> a lot of GC pressure. Writing small focused benchmark can be useful. Like, create a cache with 10_000 values, then benchmark But writing something that mixes Get and Set might be more interesting, because (a) it's more real world and (b) I expect that to have the worst performance (since they're both processed by the single worker goroutine). Not sure that really helps you ...more rambling than anything I'm afraid. |
Go makes it really easy to write synthetic benchmarks. It would be nice if we added some to ccache, since right it's hard to now the perf impact (both in terms of CPU or allocations) of an arbitrary PR change.
The text was updated successfully, but these errors were encountered: