{"id":21325640,"url":"https://github.com/andreysolovyev381/circular_buffer_fixed_size","last_synced_at":"2025-06-25T22:40:25.074Z","repository":{"id":210451408,"uuid":"726592757","full_name":"andreysolovyev381/circular_buffer_fixed_size","owner":"andreysolovyev381","description":"Short exercise on a fixed size circular buffer data structure.","archived":false,"fork":false,"pushed_at":"2024-07-01T13:24:32.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T11:03:02.318Z","etag":null,"topics":["circular-buffer","circular-queue","cpp","cpp20","data-structures"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andreysolovyev381.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-12-02T20:16:51.000Z","updated_at":"2024-07-01T13:24:35.000Z","dependencies_parsed_at":"2023-12-02T21:26:53.150Z","dependency_job_id":"7bd7ac5f-6667-4d26-8f85-9870c27d1337","html_url":"https://github.com/andreysolovyev381/circular_buffer_fixed_size","commit_stats":null,"previous_names":["andreysolovyev381/circular_buffer_fixed","andreysolovyev381/circular_buffer_fixed_size"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreysolovyev381/circular_buffer_fixed_size","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreysolovyev381%2Fcircular_buffer_fixed_size","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreysolovyev381%2Fcircular_buffer_fixed_size/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreysolovyev381%2Fcircular_buffer_fixed_size/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreysolovyev381%2Fcircular_buffer_fixed_size/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreysolovyev381","download_url":"https://codeload.github.com/andreysolovyev381/circular_buffer_fixed_size/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreysolovyev381%2Fcircular_buffer_fixed_size/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259804834,"owners_count":22913900,"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":["circular-buffer","circular-queue","cpp","cpp20","data-structures"],"created_at":"2024-11-21T21:06:50.114Z","updated_at":"2025-06-14T11:04:21.568Z","avatar_url":"https://github.com/andreysolovyev381.png","language":"C++","readme":"### Reasoning behind\n- I have a specific usage of data window, specifically, my data comes in one at a time, so I am mostly interested in comparing joint usage of the following functionality:\n```cpp \n    push_back();\n    pop_front();\n```\nNaturally, there are some solutions for that, but the idea is to use `std::array` as it is expected to win over known implementations.  \n\n### WIP problem\nSomething strange happens here - circular buffer on `std::array` w/o any reallocation and w/o calling an elem dtor upon destruction loses to both `std::deque` and `boost::circular_buffer`. Trying to figure out what are the reasons.\n```bash\n-----------------------------------------------------------------------\nBenchmark                             Time             CPU   Iterations\n-----------------------------------------------------------------------\nPushBackPopFrontDeque/64            140 ns          139 ns      5045115\nPushBackPopFrontDeque/512          1072 ns         1070 ns       660096\nPushBackPopFrontDeque/2048         4227 ns         4219 ns       165916\nPushBackPopFrontBoostCB/64         88.5 ns         88.4 ns      7919658\nPushBackPopFrontBoostCB/512         691 ns          690 ns      1014275\nPushBackPopFrontBoostCB/2048       2759 ns         2754 ns       254187\nPushBackPopFrontCBFixed/64          175 ns          174 ns      4013473\nPushBackPopFrontCBFixed/512         856 ns          855 ns       818852\nPushBackPopFrontCBFixed/2048       3406 ns         3400 ns       205866\n\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreysolovyev381%2Fcircular_buffer_fixed_size","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreysolovyev381%2Fcircular_buffer_fixed_size","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreysolovyev381%2Fcircular_buffer_fixed_size/lists"}