{"id":13804031,"url":"https://github.com/dlang-community/containers","last_synced_at":"2026-01-07T12:01:07.282Z","repository":{"id":15874897,"uuid":"18615769","full_name":"dlang-community/containers","owner":"dlang-community","description":"Containers backed by std.experimental.allocator","archived":false,"fork":false,"pushed_at":"2023-11-15T12:40:13.000Z","size":973,"stargazers_count":111,"open_issues_count":16,"forks_count":39,"subscribers_count":21,"default_branch":"master","last_synced_at":"2025-05-13T17:36:33.911Z","etag":null,"topics":["array","containers","d","data-structures","double-linked-list","fast","hashmap","set","single-linked-list"],"latest_commit_sha":null,"homepage":"https://dlang-community.github.io/containers/index.html","language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dlang-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-04-09T22:32:08.000Z","updated_at":"2024-09-20T18:27:23.000Z","dependencies_parsed_at":"2024-01-03T01:30:19.946Z","dependency_job_id":null,"html_url":"https://github.com/dlang-community/containers","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/dlang-community/containers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang-community%2Fcontainers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang-community%2Fcontainers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang-community%2Fcontainers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang-community%2Fcontainers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dlang-community","download_url":"https://codeload.github.com/dlang-community/containers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dlang-community%2Fcontainers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28235224,"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","status":"online","status_checked_at":"2026-01-07T02:00:05.975Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["array","containers","d","data-structures","double-linked-list","fast","hashmap","set","single-linked-list"],"created_at":"2024-08-04T01:00:40.532Z","updated_at":"2026-01-07T12:01:07.196Z","avatar_url":"https://github.com/dlang-community.png","language":"D","readme":"Containers [![CI status](https://travis-ci.org/dlang-community/containers.svg?branch=master)](https://travis-ci.org/dlang-community/containers/)\n==========\n\nContainers backed by std.experimental.allocator\n\n# Documentation\nDocumentation is available at http://dlang-community.github.io/containers/index.html\n\n# Example\n\n```d\n/+dub.sdl:\ndependency \"emsi_containers\" version=\"~\u003e0.6\"\n+/\nimport std.stdio;\nvoid main(string[] args)\n{\n    import containers;\n    DynamicArray!int arr;\n    arr ~= 1;\n    foreach (e; arr)\n        e.writeln;\n}\n```\n\n[![Open on run.dlang.io](https://img.shields.io/badge/run.dlang.io-open-blue.svg)](https://run.dlang.io/is/8GYopZ)\n\n# Insertion Speed Benchmark\n![Benchmark](times.png)\n\nMeasurements taken on a `Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz` with 8GB of memory.\nCompiled with dmd-2.068.0 using `-O -release -inline` flags.\n\n### Code\n\n```d\nimport containers.ttree;\nimport std.container.rbtree;\nimport containers.slist;\nimport std.container.slist;\nimport containers.unrolledlist;\nimport std.experimental.allocator;\nimport std.experimental.allocator.building_blocks.allocator_list;\nimport std.experimental.allocator.building_blocks.region;\nimport std.experimental.allocator.mallocator;\nimport std.datetime;\nimport std.stdio;\n\n// For fun: change this number and watch the effect it has on the execution time\nalias Allocator = AllocatorList!(a =\u003e Region!Mallocator(1024 * 16), Mallocator);\n\nenum NUMBER_OF_ITEMS = 500_000;\n\nvoid testEMSIContainer(alias Container, string ContainerName)()\n{\n\tAllocator allocator;\n\tauto c = Container!(int, typeof(\u0026allocator))(\u0026allocator);\n\tStopWatch sw = StopWatch(AutoStart.yes);\n\tforeach (i; 0 .. NUMBER_OF_ITEMS)\n\t\tc.insert(i);\n\tsw.stop();\n\twriteln(\"Inserts for \", ContainerName, \" finished in \",\n\t\tsw.peek().to!(\"msecs\", float), \" milliseconds.\");\n}\n\nvoid testPhobosContainer(alias Container, string ContainerName)()\n{\n\tstatic if (is(Container!int == class))\n\t\tauto c = new Container!int();\n\telse\n\t\tContainer!int c;\n\tStopWatch sw = StopWatch(AutoStart.yes);\n\tforeach (i; 0 .. NUMBER_OF_ITEMS)\n\t\tc.insert(i);\n\tsw.stop();\n\twriteln(\"Inserts for \", ContainerName, \" finished in \",\n\t\tsw.peek().to!(\"msecs\", float), \" milliseconds.\");\n}\n\nvoid main()\n{\n\ttestEMSIContainer!(TTree, \"TTree\")();\n\ttestPhobosContainer!(RedBlackTree, \"RedBlackTree\")();\n\n\ttestPhobosContainer!(std.container.slist.SList, \"Phobos SList\")();\n\ttestEMSIContainer!(containers.slist.SList, \"EMSI SList\")();\n\n\ttestEMSIContainer!(UnrolledList, \"UnrolledList\")();\n}\n```\n","funding_links":[],"categories":["Containers"],"sub_categories":["Bare metal / kernel development"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlang-community%2Fcontainers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdlang-community%2Fcontainers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdlang-community%2Fcontainers/lists"}