{"id":22683264,"url":"https://github.com/mtchavez/rb-array-sorting","last_synced_at":"2025-06-26T18:32:25.438Z","repository":{"id":5854544,"uuid":"7071294","full_name":"mtchavez/rb-array-sorting","owner":"mtchavez","description":null,"archived":false,"fork":false,"pushed_at":"2012-12-08T23:18:51.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-29T14:32:29.644Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Ruby","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/mtchavez.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":"2012-12-08T19:40:54.000Z","updated_at":"2013-12-22T13:45:58.000Z","dependencies_parsed_at":"2022-08-25T12:30:35.259Z","dependency_job_id":null,"html_url":"https://github.com/mtchavez/rb-array-sorting","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mtchavez/rb-array-sorting","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Frb-array-sorting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Frb-array-sorting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Frb-array-sorting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Frb-array-sorting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mtchavez","download_url":"https://codeload.github.com/mtchavez/rb-array-sorting/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mtchavez%2Frb-array-sorting/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262122932,"owners_count":23262496,"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":[],"created_at":"2024-12-09T21:11:25.756Z","updated_at":"2025-06-26T18:32:25.368Z","avatar_url":"https://github.com/mtchavez.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## rb-array-sorting\n\n  Recursive merge sort in Ruby.\n  [![endorse](http://api.coderwall.com/mtchavez/endorsecount.png)](http://coderwall.com/mtchavez)\n\n### Merge Sort\nExample:\n\n    array = []\n    7000.times{ array \u003c\u003c rand(500) }\n    array.merge_sort { |a,b| a \u003c= b }\n\n### Quick Sort\nExample:\n\n    array = []\n    7000.times{ array \u003c\u003c rand(500) }\n    array.quick_sort\n\n### Benchmarks\n\nBenchmarks of merge and quick sort against ruby array sort:\n\n    require 'benchmark'\n\n    Benchmark.bm do |b|\n      b.report('ruby')       { array.sort }\n      b.report('merge_sort') { array.merge_sort { |a,b| a \u003c= b } }\n      b.report('quick_sort') { array.quick_sort }\n    end\n\n                user       system     total       real\n    ruby        0.000000   0.000000   0.000000 (  0.001410)\n    merge_sort  0.430000   0.020000   0.450000 (  0.451126)\n    quick_sort  0.060000   0.000000   0.060000 (  0.059994)\n\n### Specs\nRun ```rake``` for specs.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Frb-array-sorting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmtchavez%2Frb-array-sorting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmtchavez%2Frb-array-sorting/lists"}