{"id":16661390,"url":"https://github.com/bodigrim/tasty-bench-fit","last_synced_at":"2025-10-19T07:09:31.379Z","repository":{"id":155387281,"uuid":"623220068","full_name":"Bodigrim/tasty-bench-fit","owner":"Bodigrim","description":"Benchmark a given function for variable input sizes and find out its time complexity","archived":false,"fork":false,"pushed_at":"2025-03-01T14:14:41.000Z","size":21,"stargazers_count":25,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-16T06:32:34.470Z","etag":null,"topics":["algorithm-analysis","algorithm-complexity","asymptotics","benchmark-framework","complexity-analysis","haskell","nonlinear-regression","performance-analysis","performance-measurement","performance-testing","regression","time-complexity","time-complexity-analysis"],"latest_commit_sha":null,"homepage":"","language":"Haskell","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/Bodigrim.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-04-04T00:00:56.000Z","updated_at":"2025-03-01T14:14:44.000Z","dependencies_parsed_at":"2023-07-11T07:16:36.184Z","dependency_job_id":"b1774920-2662-472e-8d53-d70bde03f4ea","html_url":"https://github.com/Bodigrim/tasty-bench-fit","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodigrim%2Ftasty-bench-fit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodigrim%2Ftasty-bench-fit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodigrim%2Ftasty-bench-fit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Bodigrim%2Ftasty-bench-fit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Bodigrim","download_url":"https://codeload.github.com/Bodigrim/tasty-bench-fit/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243950036,"owners_count":20373657,"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-analysis","algorithm-complexity","asymptotics","benchmark-framework","complexity-analysis","haskell","nonlinear-regression","performance-analysis","performance-measurement","performance-testing","regression","time-complexity","time-complexity-analysis"],"created_at":"2024-10-12T10:34:48.978Z","updated_at":"2025-10-19T07:09:26.346Z","avatar_url":"https://github.com/Bodigrim.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tasty-bench-fit\n\nBenchmark a given function for variable input sizes and find out its time complexity.\n\n```haskell\n\u003e fit $ mkFitConfig (\\x -\u003e sum [1..x]) (10, 10000)\n1.2153e-8 * x\n\u003e fit $ mkFitConfig (\\x -\u003e Data.List.nub [1..x]) (10, 10000)\n2.8369e-9 * x ^ 2\n\u003e fit $ mkFitConfig (\\x -\u003e Data.List.sort $ take (fromIntegral x) $ iterate (\\n -\u003e n * 6364136223846793005 + 1) (1 :: Int)) (10, 100000)\n5.2990e-8 * x * log x\n```\n\nOne can usually get reliable results for functions, which do not allocate much: like in-place vector sort or fused list operations like `sum [1..x]`.\n\nUnfortunately, fitting functions, which allocate a lot, is likely to be disappointing: GC kicks in irregularly depending on nursery and heap sizes and often skews observations beyond any recognition. Consider running such measurements with `-O0` or in `ghci` prompt. This is how the usage example above was generated. Without optimizations your program allocates much more and triggers GC regularly, somewhat evening out its effect.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodigrim%2Ftasty-bench-fit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbodigrim%2Ftasty-bench-fit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbodigrim%2Ftasty-bench-fit/lists"}