{"id":18534914,"url":"https://github.com/gregorykogan/sorts","last_synced_at":"2025-04-09T15:31:53.222Z","repository":{"id":204683764,"uuid":"712423742","full_name":"GregoryKogan/sorts","owner":"GregoryKogan","description":"This is a sorting algorithm visualizer. It is written in C++ and uses SDL2 for graphics. It is compiled to WASM using Emscripten and embedded in a Vue.js app.","archived":false,"fork":false,"pushed_at":"2024-05-13T07:51:25.000Z","size":4528,"stargazers_count":10,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T08:41:41.493Z","etag":null,"topics":["algorithm","algorithms","cpp","emscripten","sdl2","sort","sorting-algorithms","sorting-visualization","wasm"],"latest_commit_sha":null,"homepage":"https://gregorykogan.github.io/sorts/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GregoryKogan.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-10-31T12:52:33.000Z","updated_at":"2025-03-03T19:41:21.000Z","dependencies_parsed_at":"2023-12-03T01:25:06.377Z","dependency_job_id":"2e0d9683-9d01-4915-8ea5-f1f0822c4d85","html_url":"https://github.com/GregoryKogan/sorts","commit_stats":null,"previous_names":["gregorykogan/sorts"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fsorts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fsorts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fsorts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GregoryKogan%2Fsorts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GregoryKogan","download_url":"https://codeload.github.com/GregoryKogan/sorts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248058037,"owners_count":21040680,"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","algorithms","cpp","emscripten","sdl2","sort","sorting-algorithms","sorting-visualization","wasm"],"created_at":"2024-11-06T19:17:56.728Z","updated_at":"2025-04-09T15:31:52.848Z","avatar_url":"https://github.com/GregoryKogan.png","language":"C++","readme":"# sorts\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=https://github.com/GregoryKogan/sorts/assets/60318411/3edb4110-8152-4b57-b107-fddfb72b5936\u003e\n\u003c/p\u003e\n\n## Description\n\n[![Hits-of-Code](https://hitsofcode.com/github/GregoryKogan/sorts?branch=main)](https://hitsofcode.com/github/GregoryKogan/sorts/view?branch=main)\n\nThis is a sorting algorithm visualizer. It is written in C++ and uses SDL2 for graphics. It is compiled to WASM using Emscripten and embedded in a Vue.js app.\nYou can see it in action [here](https://gregorykogan.github.io/sorts/).\n\n## Benchmarks\n\nAveraged execution time of sorting algorithms on random sequences of integers. Time is measured in microseconds.\n\n| Sequence length | Bubble Sort | Selection Sort | Insertion Sort | Merge Sort | Iterative Merge Sort | Quick Sort | Iterative Quick Sort | Heap Sort | Counting Sort | Cocktail Sort | Radix Sort | Shell Sort | Gnome Sort | Odd Even Sort | Comb Sort | Cycle Sort |\n| --------------- | ----------- | -------------- | -------------- | ---------- | -------------------- | ---------- | -------------------- | --------- | ------------- | ------------- | ---------- | ---------- | ---------- | ------------- | --------- | ---------- |\n| 500             | 2576        | 840            | 921            | 520        | 380                  | 144        | 103                  | 216       | 103           | 1012          | 71         | 66         | 1062       | 1161          | 69        | 2166       |\n| 1000            | 5089        | 2125           | 2645           | 888        | 699                  | 257        | 206                  | 400       | 215           | 3735          | 149        | 150        | 4091       | 4425          | 164       | 8673       |\n| 1500            | 11472       | 4717           | 5765           | 1454       | 1195                 | 394        | 344                  | 655       | 395           | 8298          | 281        | 249        | 9091       | 10183         | 272       | 19472      |\n| 2000            | 20741       | 8455           | 10671          | 2013       | 1606                 | 533        | 512                  | 892       | 602           | 15415         | 420        | 347        | 16769      | 18145         | 405       | 34971      |\n| 2500            | 32427       | 13058          | 16086          | 2647       | 2364                 | 678        | 714                  | 1138      | 860           | 23433         | 571        | 482        | 25345      | 29216         | 491       | 54994      |\n| 3000            | 46733       | 18701          | 23303          | 3283       | 2853                 | 828        | 939                  | 1400      | 1167          | 33524         | 750        | 562        | 37054      | 41039         | 624       | 78073      |\n| 3500            | 64386       | 25672          | 32524          | 3906       | 3295                 | 950        | 1161                 | 1671      | 1511          | 46597         | 953        | 660        | 49680      | 55674         | 748       | 105577     |\n| 4000            | 83687       | 33064          | 42083          | 4731       | 3833                 | 1101       | 1429                 | 1936      | 1914          | 61321         | 1177       | 794        | 65918      | 71968         | 863       | 139237     |\n| 4500            | 106623      | 42258          | 52102          | 5375       | 5324                 | 1289       | 1753                 | 2215      | 2342          | 76173         | 1426       | 925        | 81570      | 94342         | 1021      | 175363     |\n| 5000            | 131531      | 51780          | 66319          | 6158       | 5852                 | 1459       | 2465                 | 2559      | 2907          | 96025         | 1701       | 1075       | 101923     | 113931        | 1177      | 216110     |\n| 5500            | 159348      | 62595          | 80080          | 6931       | 6394                 | 1551       | 2363                 | 2776      | 3361          | 115442        | 1996       | 1155       | 124479     | 137856        | 1202      | 261840     |\n| 6000            | 190167      | 74647          | 95260          | 7761       | 6995                 | 1736       | 2733                 | 3064      | 4035          | 137493        | 2309       | 1298       | 147215     | 164933        | 1403      | 314620     |\n| 6500            | 223331      | 88574          | 113759         | 8577       | 7610                 | 1871       | 3155                 | 3348      | 4548          | 161977        | 2656       | 1413       | 174413     | 194374        | 1554      | 375627     |\n| 7000            | 263399      | 102552         | 129494         | 9582       | 8186                 | 1985       | 3499                 | 3670      | 5228          | 188016        | 3016       | 1507       | 203878     | 226026        | 1618      | 427812     |\n| 7500            | 296904      | 116720         | 148924         | 10296      | 8916                 | 2157       | 3952                 | 3959      | 5922          | 218871        | 3393       | 1655       | 233407     | 259288        | 1814      | 490053     |\n| 8000            | 334156      | 131415         | 165817         | 11174      | 9575                 | 2336       | 4423                 | 4233      | 6697          | 242053        | 3788       | 1867       | 259779     | 297877        | 2074      | 551854     |\n| 8500            | 383343      | 150682         | 188617         | 12172      | 13653                | 2461       | 4924                 | 4513      | 7551          | 277717        | 4247       | 1949       | 299317     | 335615        | 2130      | 623002     |\n| 9000            | 425778      | 167278         | 214066         | 13120      | 14233                | 2586       | 5426                 | 4801      | 8479          | 310185        | 4757       | 2081       | 331603     | 376240        | 2124      | 696885     |\n| 9500            | 474017      | 185893         | 236970         | 14114      | 14864                | 2809       | 6031                 | 5092      | 9479          | 344152        | 5277       | 2139       | 362626     | 420169        | 2281      | 779667     |\n| 10000           | 526702      | 207652         | 261295         | 15152      | 15583                | 2897       | 6570                 | 5408      | 10572         | 382702        | 5806       | 2433       | 408214     | 468055        | 2506      | 863743     |\n\n\u003cp align=\"center\"\u003e\n    \u003cimg style=\"width: 100%\" src=\"sorts/src/cpp/src/benchmark/results/all.png\" /\u003e\n    \u003cimg style=\"width: 100%\" src=\"sorts/src/cpp/src/benchmark/results/fast.png\" /\u003e\n\u003c/p\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorykogan%2Fsorts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgregorykogan%2Fsorts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgregorykogan%2Fsorts/lists"}