{"id":17717286,"url":"https://github.com/bwesterb/go-subtlesort","last_synced_at":"2025-10-05T16:46:34.825Z","repository":{"id":57580114,"uuid":"164351224","full_name":"bwesterb/go-subtlesort","owner":"bwesterb","description":"Constant-time sorting for Go","archived":false,"fork":false,"pushed_at":"2019-01-24T17:59:26.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T12:04:04.460Z","etag":null,"topics":["constant-time","go","golang","sorting","sorting-network"],"latest_commit_sha":null,"homepage":null,"language":"Go","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/bwesterb.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":"2019-01-06T22:31:41.000Z","updated_at":"2019-01-24T17:59:27.000Z","dependencies_parsed_at":"2022-09-18T18:15:22.424Z","dependency_job_id":null,"html_url":"https://github.com/bwesterb/go-subtlesort","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/bwesterb/go-subtlesort","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fgo-subtlesort","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fgo-subtlesort/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fgo-subtlesort/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fgo-subtlesort/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bwesterb","download_url":"https://codeload.github.com/bwesterb/go-subtlesort/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bwesterb%2Fgo-subtlesort/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278486266,"owners_count":25994941,"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","status":"online","status_checked_at":"2025-10-05T02:00:06.059Z","response_time":54,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["constant-time","go","golang","sorting","sorting-network"],"created_at":"2024-10-25T14:19:41.799Z","updated_at":"2025-10-05T16:46:34.792Z","avatar_url":"https://github.com/bwesterb.png","language":"Go","readme":"go-subtlesort\n=============\n\nConstant-time sorting for Go with an interface similar to the standard library\n[sort package](https://golang.org/pkg/sort/).\n\n[Documentation is on godoc.](https://godoc.org/github.com/bwesterb/go-subtlesort)\n\nCurrently, performance is 50% slower than buildin sort (for `[]int32`),\nbut there is room for massive improvements.\n\n```\nBenchmarkSubtleSortInt32s1-4    \t30000000\t        55.2 ns/op\t 144.81 MB/s\nBenchmarkSubtleSortInt32s2-4    \t20000000\t       102 ns/op\t 155.85 MB/s\nBenchmarkSubtleSortInt32s3-4    \t10000000\t       226 ns/op\t 141.17 MB/s\nBenchmarkSubtleSortInt32s4-4    \t 2000000\t       611 ns/op\t 104.67 MB/s\nBenchmarkSubtleSortInt32s5-4    \t 1000000\t      1781 ns/op\t  71.84 MB/s\nBenchmarkSubtleSortInt32s6-4    \t  300000\t      4999 ns/op\t  51.20 MB/s\nBenchmarkSubtleSortInt32s7-4    \t  100000\t     13298 ns/op\t  38.50 MB/s\nBenchmarkSubtleSortInt32s8-4    \t   50000\t     33955 ns/op\t  30.16 MB/s\nBenchmarkSubtleSortInt32s9-4    \t   20000\t     85390 ns/op\t  23.98 MB/s\nBenchmarkSubtleSortInt32s10-4   \t   10000\t    211829 ns/op\t  19.34 MB/s\nBenchmarkSubtleSortInt32s11-4   \t    3000\t    564152 ns/op\t  14.52 MB/s\nBenchmarkSubtleSortInt32s12-4   \t    1000\t   1271305 ns/op\t  12.89 MB/s\nBenchmarkSubtleSortInt32s13-4   \t     500\t   2876991 ns/op\t  11.39 MB/s\nBenchmarkSortInt32s1-4          \t20000000\t       113 ns/op\t  70.53 MB/s\nBenchmarkSortInt32s2-4          \t10000000\t       148 ns/op\t 107.91 MB/s\nBenchmarkSortInt32s3-4          \t 5000000\t       307 ns/op\t 104.21 MB/s\nBenchmarkSortInt32s4-4          \t 2000000\t       753 ns/op\t  84.92 MB/s\nBenchmarkSortInt32s5-4          \t 1000000\t      1720 ns/op\t  74.39 MB/s\nBenchmarkSortInt32s6-4          \t  300000\t      5279 ns/op\t  48.49 MB/s\nBenchmarkSortInt32s7-4          \t  100000\t     12941 ns/op\t  39.56 MB/s\nBenchmarkSortInt32s8-4          \t   50000\t     30961 ns/op\t  33.07 MB/s\nBenchmarkSortInt32s9-4          \t   20000\t     71305 ns/op\t  28.72 MB/s\nBenchmarkSortInt32s10-4         \t   10000\t    160705 ns/op\t  25.49 MB/s\nBenchmarkSortInt32s11-4         \t    5000\t    360543 ns/op\t  22.72 MB/s\nBenchmarkSortInt32s12-4         \t    2000\t    826594 ns/op\t  19.82 MB/s\nBenchmarkSortInt32s13-4         \t    1000\t   1771341 ns/op\t  18.50 MB/s\n```\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwesterb%2Fgo-subtlesort","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbwesterb%2Fgo-subtlesort","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbwesterb%2Fgo-subtlesort/lists"}