{"id":22731702,"url":"https://github.com/vitalyisaev2/concurrent_set","last_synced_at":"2025-10-05T02:56:06.245Z","repository":{"id":52224607,"uuid":"359574379","full_name":"vitalyisaev2/concurrent_set","owner":"vitalyisaev2","description":"Various implementations of linked list based set","archived":false,"fork":false,"pushed_at":"2021-05-19T20:27:38.000Z","size":245,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-30T01:38:01.855Z","etag":null,"topics":["concurrent-data-structure","lock-free","wait-free"],"latest_commit_sha":null,"homepage":"","language":"Go","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/vitalyisaev2.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":"2021-04-19T19:25:15.000Z","updated_at":"2021-05-19T20:27:40.000Z","dependencies_parsed_at":"2022-09-11T09:52:43.891Z","dependency_job_id":null,"html_url":"https://github.com/vitalyisaev2/concurrent_set","commit_stats":null,"previous_names":["vitalyisaev2/linked_list_set"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/vitalyisaev2/concurrent_set","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalyisaev2%2Fconcurrent_set","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalyisaev2%2Fconcurrent_set/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalyisaev2%2Fconcurrent_set/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalyisaev2%2Fconcurrent_set/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vitalyisaev2","download_url":"https://codeload.github.com/vitalyisaev2/concurrent_set/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vitalyisaev2%2Fconcurrent_set/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278403319,"owners_count":25981014,"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":"2025-10-05T02:00:06.059Z","response_time":54,"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":["concurrent-data-structure","lock-free","wait-free"],"created_at":"2024-12-10T19:30:01.051Z","updated_at":"2025-10-05T02:56:06.217Z","avatar_url":"https://github.com/vitalyisaev2.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Concurrent set data structure \nThis repository contains benchmarks for different implementations of linked list based concurrent set. \nThe algorithms are taken from The Art of Multiprocessor Programming, 2nd edition, 2021, by Herlihy, Shavit, Luchangco and Spear.\n\n1. [Hardware](#Hardware)\n2. [Implementations](#Implementations)\n3. [Benchmarks](#Benchmarks)\n4. [Conclusions](#Conclusions)\n\n## Hardware\n- AMD Ryzen 7 2700X Eight-Core Processor, 16 cores\n- 32GiB DIMM DDR4 2933 MHz\n- Fedora 32 (Linux kernel 5.7.8)\n\n## Implementations\n\n- `CoarseGrainedSyncSet`\n- `FineGrainedSyncSet`\n- `OptimisticSyncSet`\n- `LazySyncSet`\n- `NonBlockingSyncSet`\n\n## Benchmarks\n\nTwo arrays are provided for each benchmark case:\n\n- Ascending array `ascendingArray := [1, ..., 1024]` (1024 items total)\n- Shuffled array `rand.Shuffle(ascendingArray)` (1024 items total)\n\nIn each benchmark, every thread is trying to insert/seek/remove the **full** input array.\n\n### Concurrent write\n- Each thread inserts items from the input array to the set.\n![](report/insert_ascending_array.svg)\n![](report/insert_shuffled_array.svg)\n\n### Concurrent read \n- Each thread tries to seek the items in the pre-prepared set.\n![](report/contains_ascending_array.svg)\n![](report/contains_shuffled_array.svg)\n  \n### Concurrent write and read\n- Half of the threads are inserting items from the input array to the set, while the other half is seeking for the items.\n![](report/insert_and_contains_ascending_array.svg)\n![](report/insert_and_contains_shuffled_array.svg)\n\n### Concurrent write and delete\n- Half of the threads are inserting items from the input array to the set, while the other half is removing the items.\n![](report/insert_and_remove_ascending_array.svg)\n![](report/insert_and_remove_shuffled_array.svg)\n  \n## Conclusions\n\n* In the benchmarks implying concurrent writes and reads `LazySyncSet` showed better results. \n* In the benchmarks implying concurrent writes and deletions everything it's important to compare on the number of CPU cores and concurrent threads: if the number of threads exceeds the number of CPU cores, `NonBlockingSyncSet` is better, otherwise use `LazySyncSet`.\n* When it comes to concurrent reads (with no mutations at all), `CoarseGrainedSyncSet` wins because it acts as wait-free data structure (due to `sync.RWMutex`),\n  and it's faster than optimistic implementations because it doesn't need to **validate** the discovered node.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalyisaev2%2Fconcurrent_set","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvitalyisaev2%2Fconcurrent_set","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvitalyisaev2%2Fconcurrent_set/lists"}