{"id":18317091,"url":"https://github.com/eliahkagan/parallelmemorybenchmark","last_synced_at":"2026-03-01T05:06:07.701Z","repository":{"id":65447432,"uuid":"586236192","full_name":"EliahKagan/ParallelMemoryBenchmark","owner":"EliahKagan","description":"C++ sorting with execution policies (benchmark)","archived":false,"fork":false,"pushed_at":"2024-05-01T06:59:04.000Z","size":91,"stargazers_count":2,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-21T15:51:31.923Z","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":"0bsd","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EliahKagan.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-01-07T12:31:27.000Z","updated_at":"2023-01-27T18:41:53.000Z","dependencies_parsed_at":"2024-01-01T12:25:37.214Z","dependency_job_id":"71136940-8fc3-45c4-ae72-f82b2ac597bc","html_url":"https://github.com/EliahKagan/ParallelMemoryBenchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/EliahKagan/ParallelMemoryBenchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliahKagan%2FParallelMemoryBenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliahKagan%2FParallelMemoryBenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliahKagan%2FParallelMemoryBenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliahKagan%2FParallelMemoryBenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EliahKagan","download_url":"https://codeload.github.com/EliahKagan/ParallelMemoryBenchmark/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EliahKagan%2FParallelMemoryBenchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29960266,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T01:47:18.291Z","status":"online","status_checked_at":"2026-03-01T02:00:07.437Z","response_time":124,"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":[],"created_at":"2024-11-05T18:04:58.361Z","updated_at":"2026-03-01T05:06:07.674Z","avatar_url":"https://github.com/EliahKagan.png","language":"C++","readme":"\u003c!-- SPDX-License-Identifier: 0BSD --\u003e\n\n# ParallelMemoryBenchmark\n\nThis is a simple memory benchmarking tool that makes an array of pseudorandom\nnumbers and sorts them using an execution policy. The length and policy are\nspecified by the user.\n\nParallelMemoryBenchmark is an outgrowth of a program meant to reproduce a\nvexing system stability problem. It is not really well-suited to use as a\ngeneral-purpose benchmark.\n\nHowever, it remains interesting as a demonstration of [C++ parallel execution\npolicies](https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t)\nand as a limited benchmark of them in sorting.\n\n## License\n\nThis software is licensed under [0BSD](https://spdx.org/licenses/0BSD.html).\nSee [**`LICENSE`**](LICENSE).\n\n## Building\n\n64-bit builds are recommended.\n\nRelease builds (that is, building with optimizations turned on and debug\nsymbols not emitted) are highly recommended. This is because the timings are of\nonly slight interest otherwise, and completely irrelevant for comparison\npurposes.\n\nLibrary dependencies are resolved with\n[`vcpkg`](https://vcpkg.io/en/getting-started.html), which is set up as a\nsubmodule.\n\n**See [`building.md`](building.md) for build instructions.**\n\n## Usage\n\nThe most basic usage is to run `pmb` specifying only the length of the\narray—that is, the number of integers to sort. For example, to sort a billion\nintegers:\n\n```sh\n./pmb 1000000000\n```\n\nOutput looks like this:\n\n```text\n   length:  1000000000 elements (~3814 MiB)\n     seed:  1824255722  (generated by the system)\nsort mode:  std::execution::par (parallelize)\n\nAllocating/zeroing... Done. (1296 ms)\nGenerating... Done. (3491 ms)\nHashing... 7c99ae86. (220 ms)\nSorting... Done. (15077 ms)\nRehashing... 7c99ae86, same. (253 ms)\nChecking... sorted. (608 ms)\n\nTest completed in about 21.3 seconds (21320 ms).\n```\n\nPassing `--help` prints a message that includes a description of all options.\nThe other currently available options are:\n\n```text\n  -l [ --length ] arg   specify how many elements to generate and sort\n  -s [ --seed ] arg     custom seed for PRNG (omit to use system entropy)\n  -2 [ --twice ]        after sorting, sort again (may test adaptivity)\n  -t [ --time ]         display human-readable start time\n  -S [ --seq ]          don't try to parallelize\n  -P [ --par ]          try to parallelize (default)\n  -U [ --par-unseq ]    try to parallelize, may migrate thread and vectorize\n```\n\nOf special importance are the options `--seq`, `--par`, and `--par-unseq`, which\nspecify the policy execution. By default, as shown above, it is as if `--par`\nwere passed. These options correspond to\n[`execution_policy_tag_t`](https://en.cppreference.com/w/cpp/algorithm/execution_policy_tag_t)\npolicies.\n\n## Authors\n\nParallelMemoryBenchmark is written by\n[Eliah Kagan](https://github.com/EliahKagan) and\n[David Vassallo](https://github.com/dmvassallo).\n\n## Acknowledgements\n\nThe `-2`/`--twice` feature is due to a suggestion by **Godfrey Vassallo**, who\npointed out that it would be interesting to compare the performance of the\noriginal sorting operation with a second sorting operation, carried out\nimmediately thereafter on the just-sorted elements.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliahkagan%2Fparallelmemorybenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feliahkagan%2Fparallelmemorybenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feliahkagan%2Fparallelmemorybenchmark/lists"}