{"id":21530963,"url":"https://github.com/ibrahimtanyalcin/mergesort","last_synced_at":"2025-10-27T19:12:47.035Z","repository":{"id":143945262,"uuid":"393070702","full_name":"IbrahimTanyalcin/MergeSort","owner":"IbrahimTanyalcin","description":"Merge Sort algorithm implementation without recursion, using cached binary trees","archived":false,"fork":false,"pushed_at":"2021-08-10T11:58:01.000Z","size":569,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-24T06:27:21.517Z","etag":null,"topics":["javascript","merge-sort","mergesort","mergesort-algorithm","performance","sorting-algorithms","stable-sort"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IbrahimTanyalcin.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":"2021-08-05T14:23:06.000Z","updated_at":"2022-04-05T20:24:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"f718b84f-36f0-4763-b3ca-3c818dc5c8cf","html_url":"https://github.com/IbrahimTanyalcin/MergeSort","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimTanyalcin%2FMergeSort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimTanyalcin%2FMergeSort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimTanyalcin%2FMergeSort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IbrahimTanyalcin%2FMergeSort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IbrahimTanyalcin","download_url":"https://codeload.github.com/IbrahimTanyalcin/MergeSort/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244094277,"owners_count":20397020,"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":["javascript","merge-sort","mergesort","mergesort-algorithm","performance","sorting-algorithms","stable-sort"],"created_at":"2024-11-24T02:10:59.858Z","updated_at":"2025-10-27T19:12:42.001Z","avatar_url":"https://github.com/IbrahimTanyalcin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MergeSort \u003cimg src=\"./logo/logo.png\" width='30' height='auto'\u003e\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/b623fd94de934c0897bf646814d3476f)](https://www.codacy.com/gh/IbrahimTanyalcin/MergeSort/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=IbrahimTanyalcin/MergeSort\u0026amp;utm_campaign=Badge_Grade)\n[![DOI](https://zenodo.org/badge/393070702.svg)](https://zenodo.org/badge/latestdoi/393070702)\n\nMergesort algorithm without recursion, using cached binary trees 👇 \n\n\u003csmall\u003e\n\n- Generating a tree beforehand, divides the problem in half, where the first part can be calculated once and reused for arrays with same size.\n- Lack of recursion avoids functions calls, making the algorithm perform as close as possible to natively compiled vendor implementations.\n\n\u003c/small\u003e\n\nFor larger arrays (\u003e 1M) it performs faster than native solutions (around %25-%50 faster). For smaller arrays performs comparable or slower (around %25 slower).\n\n\u003cbr\u003e\u003cbr\u003e\n|milliseconds| 1M \u003csup\u003e*\u003c/sup\u003e| 10M \u003csup\u003e**†\u003c/sup\u003e | 100K \u003csup\u003e†\u003c/sup\u003e| 100K |\n|:----:|:----:|:----:|:-----:|:-----:|\n|Mergesort| 34900| 229000| 11000 |10900\n|Chrome| 35200| 326000|10200  |10200\n\n\u003csmall\u003e\u003csmall\u003e\n†: Instance created using `size` option\u003cbr\u003e\n*: 50 iterations\u003cbr\u003e\n**: 30 iterations\u003cbr\u003e\n\u003c/small\u003e\u003c/small\u003e \n\u003cbr\u003e\u003cbr\u003e\n\n## [Documentation](https://ibrahimtanyalcin.github.io/MergeSort/)\n\nFor a list of config options, see [here](https://ibrahimtanyalcin.github.io/MergeSort/).\n\nFor directly embedding to html, if you are using a browser with compatibility \u003e ie11, use the file ending with `...evergreen.min.js` in the `dist` folder. Otherwise, you can fall back to `...es5.min.js`. To read the entire build, refer to the files without the `.min.` part.\n\n## Usage\n\n```javascript\nlet instance = Mergesort(),\n    array = Array.from({length:100}).map(d =\u003e Math.random());\n\ninstance(array, (a,b) =\u003e a - b);\n```\n\n## Installation\n\n```javascript\nnpm install @ibowankenobi/mergesort\n```\n## Build\n\n```javascript\nnpm run build\n```\nYou will end up with 4 files in the `dist` folder, an es5 version, an es6 version and minified versions of both.\n\n## Browser\n\n```javascript\n\u003cscript src=\"https://cdn.jsdelivr.net/npm/ibowankenobi-mergesort\"\u003e\u003c/script\u003e\n```\n\nThe contents of the request above is the same as `./dist/mergesort.x.y.z.evergreen.min.js`.\n\nIf you want to request a particular version, check instructions at [jsdelivr](https://www.jsdelivr.com/).\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimtanyalcin%2Fmergesort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fibrahimtanyalcin%2Fmergesort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fibrahimtanyalcin%2Fmergesort/lists"}