-
Notifications
You must be signed in to change notification settings - Fork 19.9k
Adaptive Replacement Cache (ARC) #5116
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
Conversation
Have you read the CONTRIBUTING.md correctly? It would help if you wrote parametrized tests in a separate file in the |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #5116 +/- ##
============================================
+ Coverage 38.56% 38.65% +0.08%
- Complexity 2378 2388 +10
============================================
Files 516 517 +1
Lines 15313 15363 +50
Branches 2957 2963 +6
============================================
+ Hits 5906 5938 +32
- Misses 9121 9137 +16
- Partials 286 288 +2 ☔ View full report in Codecov by Sentry. |
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
Please ensure that tests are added to handle lines with partial coverage. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed and update the code
You should format the code. LGTM |
It aims to provide better performance compared to traditional caching algorithms like LRU (Least Recently Used) and LFU (Least Frequently Used).
Main Method Removed for ARCCache.java
Test cases added for the ARC
….java Co-authored-by: SOZEL <[email protected]>
….java Co-authored-by: SOZEL <[email protected]>
….java Co-authored-by: SOZEL <[email protected]>
….java Co-authored-by: SOZEL <[email protected]>
Replaced private final p(Pivot) using private final int t1Capacity; private final int b1Capacity; adjustCacheSize();
updated test case for t1capacity and b1 capacity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated comments
Please format your code using |
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
src/main/java/com/thealgorithms/datastructures/caches/ARCCache.java
Outdated
Show resolved
Hide resolved
Updated capacity method
Updated capacity method to handle negative input
Please add the missing tests and update your branch. |
This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution! |
Please reopen this pull request once you have made the required changes. If you need help, feel free to ask in our Discord server or ping one of the maintainers here. Thank you for your contribution! |
clang-format -i --style=file path/to/your/file.java