{"id":24013249,"url":"https://github.com/jonathspirit/_list","last_synced_at":"2026-05-16T15:02:33.487Z","repository":{"id":241632992,"uuid":"543686393","full_name":"JonathSpirit/_list","owner":"JonathSpirit","description":"_list is a headers only library for a convenient replacement of std::list","archived":false,"fork":false,"pushed_at":"2026-03-17T18:50:30.000Z","size":1416,"stargazers_count":1,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-04-16T23:39:02.154Z","etag":null,"topics":["analysis","c","container","containers","cpp","list","optimization","performance","replacement","tests"],"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/JonathSpirit.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-09-30T16:18:44.000Z","updated_at":"2025-09-10T13:24:21.000Z","dependencies_parsed_at":"2025-08-21T14:46:16.777Z","dependency_job_id":null,"html_url":"https://github.com/JonathSpirit/_list","commit_stats":null,"previous_names":["jonathspirit/_list"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/JonathSpirit/_list","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathSpirit%2F_list","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathSpirit%2F_list/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathSpirit%2F_list/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathSpirit%2F_list/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JonathSpirit","download_url":"https://codeload.github.com/JonathSpirit/_list/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JonathSpirit%2F_list/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33107564,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["analysis","c","container","containers","cpp","list","optimization","performance","replacement","tests"],"created_at":"2025-01-08T06:51:47.572Z","updated_at":"2026-05-16T15:02:33.481Z","avatar_url":"https://github.com/JonathSpirit.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# _list\n\nCopyright (C) 2025 Guillaume Guillet\n\n\u003ctable border=\"0px\"\u003e\n\u003ctr\u003e\n\u003ctd\u003e\nLicensed under the MIT License\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003ctr\u003e\n\u003ctd\u003e\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n\u003c/td\u003e\n\u003c/tr\u003e\n\u003c/table\u003e\n\n## Description\n\n_list is a headers (.hpp and .inl files) only library for a convenient replacement of current std::list implementation (May 2024)\n\nThe goal is to have the same properties of a std::list (fast insert/erase time and vast iterators validity)\nbut with faster iterations.\n\n## Features\n\n- Creation/Destruction time comparable to std::deque\n- Memory fragmentation\n- - Fast erase time\n- - Better insert time in some cases\n- But\n- - Can slow down iterations\n- - Can be memory consuming\n- Overall faster iterations than std::list\n- Insertion time comparable to std::list on complex objects\n- Insertion at the back/front comparable to std::deque and faster in some cases\n\n\n- Iterators validity :\n- - Erasing elements doesn't invalidate other iterators\n- - Inserting through the back/front doesn't invalidate iterators\n- - Inserting can invalidate iterators that are on the same block as the insertion or last block if shifting occurs\n\n## How\n\nA _list is composed of blocks of elements. Each block have the size in bits of a fundamental type (TBlockSize) :\n- uint8_t : 8 Elements\n- uint16_t : 16 Elements\n- uint32_t : 32 Elements\n- uint64_t : 64 Elements\n\nTo know if a block is full or not, a bitset with the same fundamental type is used.\nEach bit represent an element in the block. If the bit is set, the element is used, if not, the element is free.\n\nWhen inserting an element in the middle of the list, this will happen in order :\n- Check if we can insert in the current block\n- We first check if the element preceding the insertion point is free (using the bitset)\n- - If the place is not free, we will have to shift the elements to make space\n- - While shifting, we look for a free place in the last block\n- - If we find one, no allocation is needed, and we can insert the element after the shift\n- - If not, we allocate a new block, and we insert last shifted element at the middle of the new block\n\n\n## Tests\n\nEvery release mode tests have been made with the flags :\n- -O1 -DNDEBUG -Wall -Wextra -Wpedantic\n\nAnd with hardware :\n- AMD Ryzen 9 5950X\n- 64GB DDR4 3200MHz\n\n### Container creation\n\n- Container created with N elements (with N the number of iterations)\n\n![test_creation](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_creation.png?raw=true)\n\n### Container destruction\n\n- Container deleted with N elements (with N the number of iterations)\n\n![test_destruction](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_destruction.png?raw=true)\n\n### Container erase\n\n- Container created with N elements\n- Getting an iterator at the middle of the container\n- Erasing N elements from the middle iterator\n- (with N the number of iterations)\n\n![test_erase](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_erase.png?raw=true)\n\n### Container insert \"uint32_t\"\n\n- Container created with N elements\n- Getting an iterator at the middle of the container\n- Inserting N elements from the middle iterator\n- (with N the number of iterations)\n\n![test_insert_int](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_insert_int.png?raw=true)\n\n### Container insert \"string\"\n\n- Container created with N elements\n- Getting an iterator at the middle of the container\n- Inserting N elements from the middle iterator\n- (with N the number of iterations)\n\n![test_insert_str](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_insert_str.png?raw=true)\n\n### Container forward iterations\n\n- Container created with N elements\n- Iterating through all N elements\n- (with N the number of iterations)\n\n![test_iterations](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_iterations.png?raw=true)\n\n### Container push_front\n\n- Pushing N elements in an empty container\n- (with N the number of iterations)\n\n![test_pushFront](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_pushFront.png?raw=true)\n\n### Container push_back\n\n- Pushing N elements in an empty container\n- (with N the number of iterations)\n\n![test_push_back](https://github.com/JonathSpirit/_list/blob/master/images/tests/release/test_push_back.png?raw=true)\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathspirit%2F_list","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonathspirit%2F_list","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonathspirit%2F_list/lists"}