{"id":25179830,"url":"https://github.com/ajlekcahdp4/lfuda-cpp","last_synced_at":"2025-04-04T04:26:42.658Z","repository":{"id":49383647,"uuid":"517542480","full_name":"ajlekcahdp4/lfuda-cpp","owner":"ajlekcahdp4","description":"implementation of the LFU-DA caching strategy on C++","archived":false,"fork":false,"pushed_at":"2022-08-10T12:13:41.000Z","size":14905,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-09T15:46:58.368Z","etag":null,"topics":["cache","cpp","lfuda"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ajlekcahdp4.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-25T06:20:33.000Z","updated_at":"2022-08-08T07:24:41.000Z","dependencies_parsed_at":"2022-08-12T20:11:07.889Z","dependency_job_id":null,"html_url":"https://github.com/ajlekcahdp4/lfuda-cpp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajlekcahdp4%2Flfuda-cpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajlekcahdp4%2Flfuda-cpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajlekcahdp4%2Flfuda-cpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ajlekcahdp4%2Flfuda-cpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ajlekcahdp4","download_url":"https://codeload.github.com/ajlekcahdp4/lfuda-cpp/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247120374,"owners_count":20886896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cache","cpp","lfuda"],"created_at":"2025-02-09T15:46:43.967Z","updated_at":"2025-04-04T04:26:42.624Z","avatar_url":"https://github.com/ajlekcahdp4.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# LFUDA cache implementation on C++\n## table of contents\n 1. [about](#about)\n 2. [How to](#how-to-build)\n 3. [details](#details)\n## about\nIn this repository I implemented LFU-DA (least frequently used with dynamic aging) page replacement policy. And compare this policy with ideal cache replacement policy - Belady's (See the result of this comparision on random tests [there](test/compared.txt)).\n## How to build\nLinux\n```\ncmake -S ./ -B build/ -DCMAKE_BUILD_TYPE=Release\ncd build/\nmake\n```\n## How to run tests\n```\ncd build/\nctest\n```\n## How to compare number of hits of lfuda and belady (ideal cache) \n```\ncd test\n./compare.sh\n```\n## details\n### review\nLFU-DA policy similar to the classic LFU except that cache stores his age and the weight of new cache members is set to this age, not to 1 (as in LFU). As in the LFU when needs to insert new element in cache we evict the element with the lowest weight. In other words, LFU-DA combines LFU and LRU policies.\n\n### Complexity of the lookup_update () function: \nln(N) on average, worst case N * ln(N),\nwhere N - cache capacity.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajlekcahdp4%2Flfuda-cpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fajlekcahdp4%2Flfuda-cpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fajlekcahdp4%2Flfuda-cpp/lists"}