{"id":22140673,"url":"https://github.com/athlan/polsl-benchmark-sort-algorithms","last_synced_at":"2026-02-06T11:32:07.878Z","repository":{"id":14800490,"uuid":"17522676","full_name":"athlan/polsl-benchmark-sort-algorithms","owner":"athlan","description":"Comparation of C implementations sorting algorithms based on key attributes: Bucket sort, Counting sort. Research for Silesian University of Technology, course: Algorithms and Data Structures","archived":false,"fork":false,"pushed_at":"2014-03-11T09:46:28.000Z","size":568,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-29T16:26:30.632Z","etag":null,"topics":["comparation","sorting-algorithms"],"latest_commit_sha":null,"homepage":"","language":"TeX","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/athlan.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":"2014-03-07T18:04:47.000Z","updated_at":"2017-08-12T10:19:11.000Z","dependencies_parsed_at":"2022-09-17T15:42:46.331Z","dependency_job_id":null,"html_url":"https://github.com/athlan/polsl-benchmark-sort-algorithms","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/athlan%2Fpolsl-benchmark-sort-algorithms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fpolsl-benchmark-sort-algorithms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fpolsl-benchmark-sort-algorithms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/athlan%2Fpolsl-benchmark-sort-algorithms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/athlan","download_url":"https://codeload.github.com/athlan/polsl-benchmark-sort-algorithms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245258214,"owners_count":20585977,"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":["comparation","sorting-algorithms"],"created_at":"2024-12-01T21:07:02.141Z","updated_at":"2026-02-06T11:32:02.837Z","avatar_url":"https://github.com/athlan.png","language":"TeX","funding_links":[],"categories":[],"sub_categories":[],"readme":"Benchmark Sorting Algorithms\n===============================\n\nAuthor: Piotr Pelczar (piotpel817@student.polsl.pl)\n\nSilesian University of Technology, Algorithms and Data Structures course.\n\nFull article is avaliable under:\u003cbr /\u003e\nhttp://athlan.pl/incopy/polsl-benchmark-sort-algorithms/Main.pdf\n\n### Abstract\n\nThis paper describes and compares counting sort and bucket sort algorithms implementations written in C language. The main doubt is what is the impact of pointers operations in *bucket sort* relatively to single operations on arrays in *counting sort*.\n\n### Repository structure\n\n* TeX paper is under `article` directory\n* Source code is under `code` directory\n* `bin` directory contains some Bash scripts utils\n\n### Results\n\n**Counting sort is more effective than Bucket sort** (4.76 times in average and **5.91 times** for full optimization) in all cases for key range from 0 to 65k. Key range (in integer range) have no impact on time consumtion.\n\nMoreover, **gcc optimization have huge impact for Bucket sort which has operations on pointers** (132% faster) and small impact for Counting sort (22% faster).\n\nOperations on pointers can be strongly optimized and have huge impact on algorithms.\n\n![](https://raw.github.com/athlan/polsl-benchmark-sort-algorithms/master/article/materials/compare-gcc-opt3.png)\n\n![](https://raw.github.com/athlan/polsl-benchmark-sort-algorithms/master/article/materials/compare-gcc-opt-0and3.png)\n\n### `./bin` usage\n\nThere are several utils in this project:\n\n#### Programs compilation\n```\n./bin/compile.sh\n```\nor in all gcc modes:\n```\n./bin/compile-all-optimizations.sh\n```\nResults will be stored in `./target`\n\n#### Generate random dataset\nIf you want to output COUNT numbers from MIN\\_VALUE to MAX\\_VALUE, each in new line, just type:\n```\n./bin/rand-dataset.sh MIN_VALUE MAX_VALUE COUNT \u003e somefile.txt\n```\n\n#### Run benchmark\nYou can edit script and and run. Results are in CSV format, separated by semicolon.\n```\n./bin/run-benchmark.sh \u003e some_results.csv\n```\n\n#### Article TeX compilation\nTo compile tex article, please ensure, taht you have `pdflatex` in your `$PATH` and run:\n```\n./bin/print-tex.sh\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlan%2Fpolsl-benchmark-sort-algorithms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fathlan%2Fpolsl-benchmark-sort-algorithms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fathlan%2Fpolsl-benchmark-sort-algorithms/lists"}