{"id":18718587,"url":"https://github.com/clasp-developers/ctak","last_synced_at":"2025-04-12T14:07:00.997Z","repository":{"id":81170501,"uuid":"242554118","full_name":"clasp-developers/ctak","owner":"clasp-developers","description":"A small test for multithreaded C++ stack unwinding on unixes","archived":false,"fork":false,"pushed_at":"2020-02-24T20:52:34.000Z","size":10,"stargazers_count":16,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-26T08:37:32.938Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/clasp-developers.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-02-23T16:47:59.000Z","updated_at":"2025-01-18T00:19:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"d76a0f9f-979e-48a0-94c3-455c9c901487","html_url":"https://github.com/clasp-developers/ctak","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/clasp-developers%2Fctak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clasp-developers%2Fctak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clasp-developers%2Fctak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/clasp-developers%2Fctak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/clasp-developers","download_url":"https://codeload.github.com/clasp-developers/ctak/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248578865,"owners_count":21127713,"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":[],"created_at":"2024-11-07T13:22:10.037Z","updated_at":"2025-04-12T14:07:00.992Z","avatar_url":"https://github.com/clasp-developers.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ctak\n\nRun the tak and ctak functions using multiple C++ threads.\n\nThe ctak function tests how efficiently the unix unwinds the stack using C++ exception\nhandling when multiple threads are doing it in parallel.\nOn macOS the performance as you increase the number of threads is not bad.\nOn Linux (debian) - it's terrible.\n\nIt doesn't help to use llvm libunwind.\nFundamentally it comes down to that on Linux it walks every dynamically loaded library and that requires a mutex and on macOS it's doing some kind of clever caching.\n\nFrom mstorsjo on the llvm discord:\n\nThe difference in libunwind between macOS and linux is this: https://github.com/llvm/llvm-project/blob/master/libunwind/src/AddressSpace.hpp#L397-L408 vs https://github.com/llvm/llvm-project/blob/master/libunwind/src/AddressSpace.hpp#L485-L571\n\n\nThe results look like this on macOS:\n```\nmeister@CST14042 ctak$ ./mac-ctak -s\n1, 29, 0 # ctak(allocate/0) on 1 threads -\u003e 29 milliseconds\n2, 32, 0 # ctak(allocate/0) on 2 threads -\u003e 32 milliseconds\n3, 28, 0 # ctak(allocate/0) on 3 threads -\u003e 28 milliseconds\n4, 28, 0 # ctak(allocate/0) on 4 threads -\u003e 28 milliseconds\n5, 32, 0 # ctak(allocate/0) on 5 threads -\u003e 32 milliseconds\n6, 36, 0 # ctak(allocate/0) on 6 threads -\u003e 36 milliseconds\n7, 40, 0 # ctak(allocate/0) on 7 threads -\u003e 40 milliseconds\nAverage slowdown as threads are added (closer to zero the better): 1.83333 milliseconds\n```\n\nThe results look like this on Linux:\n\n```\nmeister@hermes:~/Development/ctak$ ./linux-ctak -s\n1, 35, 0 # ctak(allocate/0) on 1 threads -\u003e 35 milliseconds\n2, 59, 0 # ctak(allocate/0) on 2 threads -\u003e 59 milliseconds\n3, 102, 0 # ctak(allocate/0) on 3 threads -\u003e 102 milliseconds\n4, 159, 0 # ctak(allocate/0) on 4 threads -\u003e 159 milliseconds\n5, 225, 0 # ctak(allocate/0) on 5 threads -\u003e 225 milliseconds\n6, 291, 0 # ctak(allocate/0) on 6 threads -\u003e 291 milliseconds\n7, 359, 0 # ctak(allocate/0) on 7 threads -\u003e 359 milliseconds\nAverage slowdown as threads are added (closer to zero the better): 54 milliseconds\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclasp-developers%2Fctak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fclasp-developers%2Fctak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fclasp-developers%2Fctak/lists"}