{"id":20089683,"url":"https://github.com/fjtapia/benchmark_boost_sort","last_synced_at":"2025-03-02T15:22:58.375Z","repository":{"id":71102846,"uuid":"96209836","full_name":"fjtapia/benchmark_boost_sort","owner":"fjtapia","description":"Benchmark programs for the Boost Sort Library","archived":false,"fork":false,"pushed_at":"2022-10-20T15:51:12.000Z","size":3297,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-13T02:42:22.215Z","etag":null,"topics":["algorithm","benchmark"],"latest_commit_sha":null,"homepage":"","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/fjtapia.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":"2017-07-04T11:14:58.000Z","updated_at":"2022-10-10T18:59:52.000Z","dependencies_parsed_at":"2023-03-11T09:54:42.887Z","dependency_job_id":null,"html_url":"https://github.com/fjtapia/benchmark_boost_sort","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/fjtapia%2Fbenchmark_boost_sort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjtapia%2Fbenchmark_boost_sort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjtapia%2Fbenchmark_boost_sort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fjtapia%2Fbenchmark_boost_sort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fjtapia","download_url":"https://codeload.github.com/fjtapia/benchmark_boost_sort/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241525167,"owners_count":19976664,"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":["algorithm","benchmark"],"created_at":"2024-11-13T16:19:01.683Z","updated_at":"2025-03-02T15:22:58.352Z","avatar_url":"https://github.com/fjtapia.png","language":"C++","readme":"\u003cH1\u003eBenchmark Boost Sort Parallel\u003c/H1\u003e\n\u003cH2\u003e \u003ca href=\"https://github.com/fjtapia/benchmark_boost_sort\"\u003ehttps://github.com/fjtapia/benchmark_boost_sort\u003c/a\u003e \u003c/H2\u003e\n\n\u003cH2\u003ePRELIMINARY\u003c/H2\u003e\n\nThis repository provide :\n\n* The code of the Boost Sort Library until appear in the official release. (We hope  appear in the next version).\nThe code included in this repository is the proposed for the offcial version, don't expect changes in names and namespaces.\n* Benchmarks for to check the speed of the sort algorithms included in the library.\n* Brief documentation. (This documentaion is not the official. It is under construction).\n\n\u003cH2\u003eCODE\u003c/H2\u003e\n\nIn this repository is **included ALL the code needed to compile and run the benchmark** ( Boost Sort Library, benchmarks and scripts to execute). Don't need load any other code.\n\nThe code included in this repository is the code proposed for the offcial version. The names and namespacesare the proposed for the final version.\n\n\u003cH2\u003eBENCHMARKS\u003c/H2\u003e\n\nThere are two kinds of benchmarks:\n* Use only the Boost Sort Library. These will be included in the library\n* Use external and not free code. These can't be included in the library and are only in this repository.\n\nFor the compilers GCC and CLANG in Linux have shell scripts for to compile and run the benchmarks. For others compilers you have detailed instructions for run the benchmarks.\n\n\u003cH4\u003eONLY BOOST SORT\u003c/H4\u003e\n\nThese benchmark measure the speed with random data, and with near random data.\n\nYou can find benchmark for numbers, strings and objects of different sizes, and with different comparison operators.\n\nThere are benchmarks for single thread algorithms and parallel algorithms.\n\nThese benchmarks can be compiled by any compiler C++11 compliant, and the results provided have a look similar to this\n\nThe program generate a file of 1000 M (input.bin) with the random information used in the benchmark. When finish, this file is deleted\n\n\n                 B O O S T      S O R T\n                S I N G L E    T H R E A D\n            I N T E G E R    B E N C H M A R K\n\n          SORT OF 100 000 000 NUMBERS OF 64 BITS\n\n        [ 1 ] std::sort   [ 2 ] pdqsort          [ 3 ] std::stable_sort\n        [ 4 ] spin_sort   [ 5 ] flat_stable_sort [ 6 ] spreadsort\n\n                            |      |      |      |      |      |      |\n                            | [ 1 ]| [ 2 ]| [ 3 ]| [ 4 ]| [ 5 ]| [ 6 ]|\n        --------------------+------+------+------+------+------+------+\n        random              | 8.21 | 3.99 | 8.62 | 9.73 |10.80 | 4.26 |\n                            |      |      |      |      |      |      |\n        sorted              | 1.84 | 0.13 | 4.88 | 0.06 | 0.07 | 0.06 |\n        sorted + 0.1% end   | 6.41 | 2.91 | 4.92 | 0.41 | 0.36 | 3.16 |\n        sorted +   1% end   |14.15 | 3.39 | 4.97 | 0.55 | 0.49 | 3.65 |\n        sorted +  10% end   | 6.72 | 4.15 | 5.73 | 1.32 | 1.40 | 4.39 |\n                            |      |      |      |      |      |      |\n        sorted + 0.1% mid   | 4.41 | 3.31 | 6.58 | 1.89 | 2.61 | 3.29 |\n        sorted +   1% mid   | 4.39 | 3.62 | 7.06 | 2.12 | 3.07 | 3.80 |\n        sorted +  10% mid   | 6.35 | 4.71 | 9.56 | 4.02 | 5.49 | 4.99 |\n                            |      |      |      |      |      |      |\n        reverse sorted      | 1.36 | 0.26 | 5.12 | 0.13 | 0.14 | 1.87 |\n        rv sorted + 0.1% end| 7.57 | 2.92 | 5.22 | 0.52 | 0.42 | 2.83 |\n        rv sorted +   1% end| 4.99 | 3.33 | 5.29 | 0.66 | 0.55 | 3.45 |\n        rv sorted +  10% end| 4.62 | 4.16 | 6.03 | 1.45 | 1.44 | 4.35 |\n                            |      |      |      |      |      |      |\n        rv sorted + 0.1% mid| 4.38 | 3.29 | 6.52 | 1.89 | 2.54 | 3.28 |\n        rv sorted +   1% mid| 4.43 | 3.65 | 7.09 | 2.12 | 3.09 | 3.81 |\n        rv sorted +  10% mid| 6.42 | 4.70 | 9.46 | 4.02 | 5.53 | 5.00 |\n        --------------------+------+------+------+------+------+------+\n\n\n\u003cH4\u003eWITH EXTERNAL NON FREE CODE\u003c/H4\u003e\n\nThese benchmarks compare the Boost Sort algorithms with others algorithms from compilers and external libraries.\n\nThese benchmarks can be included in the Boost Sort Library, because use code of external sources as TBB , GCC and Microsoft PPC.\n\nThe external programs used are :\n\n* Threading Building Blocks ( TBB )\n* OpenMP of the compiler\n* [TBB experimental parallel_stable_sort](https://software.intel.com/sites/default/files/managed/48/9b/parallel_stable_sort.zip)\n\nThe program generate a file of 800 M (input.bin) with the random information used in the benchmark. When finish, this file is deleted.\n\nIn Linux, probably, the Threading Building Blocks (TBB) are in your package repository.\n\nThe code had been tested with GCC 6.3 and with CLANG 4.0. Older versions of CLANG can have problems with the OpenMP libraries, because they are not installed by default with the compiler.\n\nIn the VC++ folder, you can find the code to compile, or if you prefer, in the bin folder, you have a compiled and optimized 64 bits version with Visual Studio 2015, and bat files for to run them.\nIf don't run in your computer, probably, need to install the redistributable 2015 package.\n\n\u003cH2\u003eDOCUMENTATION\u003c/H2\u003e\n\n(This documentaion IS NOT THE OFFICIAL. IT IS UNDER CONSTRUCTION. It's only for to orientate to the users about the algorithms of the library.\n\n\nThis table provide you a brief description of the sort algorithms of the library.\n\n**\u003cH4\u003eSINGLE THREAD ALGORITHMS\u003c/H4\u003e**\n\nThe single thread algorithms of the library are :\n\n* **spreadsort**. Is a hybrid algorithm (don't use comparison operator) very fast. Designed and implemented by Steven Ross\n* **pdqsort**. Pattern-defeating quicksort (pdqsort) Novel quicksort algorithm very fast. Designed and implemented by Orson Peters.\n* **spinsort**. Stable mergesort, very fast with near sorting data. Designed and implemented by Francisco Tapia\n* **flat_stable_sort**. Stable sort with an additional memory of around 1% of the data size, very fast with near sorting data. Designed and implemented by Francisco Tapia\n\n| Algorithm | Stable | Additional memory | Best, average, and worst case |\n| --- | --- | --- | --- |\n| spreadsort | yes | Log N  | N, NLogN, NLogN |\n| pdqsort | no | Log N  | N, NLogN, NLogN |\n| spinsort | yes | N / 2  | N, NLogN, NLogN |\n| flat_stable_sort | yes| N / 100 | N, NLogN, NLogN   |\n\n\n**\u003cH4\u003ePARALLEL ALGORITHMS\u003c/H4\u003e**\n\nAll the parallel algorithms don't need any library, only need for to compile and run a C++11 compliant compiler.\n\nThe parallel algorithms of the library are :\n\n* **block_indirect_sort**. Very fast parallel sort, with a very small additional memory. Designed and implemented by Francisco Tapia\n* **sample_sort**. Parallel stable sort with an additional memory equal to the data size. Implemented by Francisco Tapia\n* **parallel_stable_sort**. Parallel stable sort with an additional memory of a half of the data size. Internally based on sample_sort. Implemented by Francisco Tapia.\n\n\n\n| Algorithm | Stable | Additional memory | Best, average, and worst case |\n| --- | --- | --- | --- |\n| block_indirect_sort | no |block_size x num_threads   | N, NLogN, NLogN |\n| sample_sort | yes |  N  | N, NLogN, NLogN |\n| parallel_stable_sort | yes| N / 2 | N, NLogN, NLogN   |\n\nThe block_size is an internal parameter of the algorithm, which  in order to achieve the highest speed, change according the size of the objects to sort according the next table. The **strings** use a block_size of 128.\n\n| object size (bytes) |1 - 15| 16 - 31 | 32 - 63 | 64 - 127 | 128 - 255 | 256 - 511 | 512 - |\n| --- | --- | --- | --- | --- | --- | --- | --- |\n| block_size |4096 |2048 | 1024| 768 | 512 | 256 | 128 |\n\n\n\n***\n*Copyright 2017  [Francisco Tapia (fjtapia@gmail.com) ] (mail:fjtapia@gmail.com)*\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjtapia%2Fbenchmark_boost_sort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffjtapia%2Fbenchmark_boost_sort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffjtapia%2Fbenchmark_boost_sort/lists"}