To help us get this pull request reviewed and merged quickly, please be sure to include the following items:
[ ] Tests (if applicable)
[ ] Documentation (if applicable)
[ ] Changelog entry
[x] A full explanation here in the PR description of the work done
PR Type
What kind of change does this PR introduce?
[ ] Bugfix
[ ] Feature
[ ] Code style update (formatting, local variables)
[ ] Refactoring (no functional changes, no api changes)
[ ] Build related changes
[ ] CI related changes
[ ] Documentation content changes
[ ] Tests
[x] Other
Backward Compatibility
Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?
[x] Yes (backward compatible)
[ ] No (breaking changes)
What's new?
Improved overall performance of KeyCache by ~26%. This was accomplished by implementing a fast path in GetOrLoad by using an RLock for the initial cache read.
Benchmarks
go test -race -bench='^BenchmarkKeyCache_*' -run=^$ -v --tags=race_tests -cpu=12 -count 6 github.com/godaddy/asherah/go/appencryption | tee benchmark.v0.4.0.out
applied changes and rerun...
go test -race -bench='^BenchmarkKeyCache_*' -run=^$ -v --tags=race_tests -cpu=12 -count 6 github.com/godaddy/asherah/go/appencryption | tee benchmark.v0.4.1.out
To help us get this pull request reviewed and merged quickly, please be sure to include the following items:
PR Type
What kind of change does this PR introduce?
Backward Compatibility
Is this change backward compatible with the most recently released version? Does it introduce changes which might change the user experience in any way? Does it alter the API in any way?
What's new?
Improved overall performance of KeyCache by ~26%. This was accomplished by implementing a fast path in GetOrLoad by using an RLock for the initial cache read.
Benchmarks
applied changes and rerun...
compared using
benchstat
...