Skip to content

Optimize LRUList when duplicate values are pushed.#2131

Merged
Dimi1010 merged 2 commits into
seladb:devfrom
Dimi1010:refactor/lru-list-opt
May 10, 2026
Merged

Optimize LRUList when duplicate values are pushed.#2131
Dimi1010 merged 2 commits into
seladb:devfrom
Dimi1010:refactor/lru-list-opt

Conversation

@Dimi1010
Copy link
Copy Markdown
Collaborator

@Dimi1010 Dimi1010 commented May 6, 2026

The LRUList::put implementation is reworked to move the already existing nodes inside m_CacheItemsList instead of performing a push + pop operations, saving an allocation and deallocation per existing value push.

@Dimi1010 Dimi1010 marked this pull request as ready for review May 6, 2026 16:59
@Dimi1010 Dimi1010 requested a review from seladb as a code owner May 6, 2026 16:59
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.68%. Comparing base (f9a9e9f) to head (69be4a8).

Additional details and impacted files
@@            Coverage Diff             @@
##              dev    #2131      +/-   ##
==========================================
- Coverage   82.68%   82.68%   -0.01%     
==========================================
  Files         332      332              
  Lines       59696    59689       -7     
  Branches    12583    12584       +1     
==========================================
- Hits        49357    49351       -6     
+ Misses       8937     8934       -3     
- Partials     1402     1404       +2     
Flag Coverage Δ
23.11.6 7.32% <0.00%> (+0.01%) ⬆️
24.11.5 7.29% <0.00%> (-0.02%) ⬇️
25.11.1 7.30% <0.00%> (-0.04%) ⬇️
alpine320 76.80% <100.00%> (+<0.01%) ⬆️
fedora42 76.40% <100.00%> (+0.02%) ⬆️
macos-14 82.19% <100.00%> (-0.01%) ⬇️
macos-15 82.18% <100.00%> (-0.01%) ⬇️
mingw32 71.00% <100.00%> (-0.02%) ⬇️
mingw64 70.98% <100.00%> (+0.08%) ⬆️
npcap ?
rhel94 76.20% <100.00%> (+<0.01%) ⬆️
ubuntu2204 76.21% <100.00%> (-0.04%) ⬇️
ubuntu2204-icpx 59.26% <100.00%> (-0.03%) ⬇️
ubuntu2404 76.50% <100.00%> (-0.01%) ⬇️
ubuntu2404-arm64 76.49% <100.00%> (-0.02%) ⬇️
ubuntu2604 76.41% <100.00%> (+<0.01%) ⬆️
unittest 82.68% <100.00%> (-0.01%) ⬇️
windows-2022 85.73% <100.00%> (+0.11%) ⬆️
windows-2025 85.76% <100.00%> (+0.11%) ⬆️
winpcap 85.76% <100.00%> (-0.09%) ⬇️
xdp 53.05% <0.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Dimi1010 Dimi1010 merged commit 0c318ca into seladb:dev May 10, 2026
42 checks passed
@Dimi1010 Dimi1010 deleted the refactor/lru-list-opt branch May 10, 2026 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants