{"id":18938322,"url":"https://github.com/faiface/complexity","last_synced_at":"2026-01-27T01:06:34.924Z","repository":{"id":150761632,"uuid":"72124188","full_name":"faiface/complexity","owner":"faiface","description":"Time/space/anything complexity measurement utility.","archived":false,"fork":false,"pushed_at":"2016-10-29T23:04:28.000Z","size":4,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-01T16:29:02.217Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"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/faiface.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,"zenodo":null}},"created_at":"2016-10-27T15:53:48.000Z","updated_at":"2017-08-18T22:30:35.000Z","dependencies_parsed_at":null,"dependency_job_id":"32fa291a-4a52-4e1f-9313-e9192da68f00","html_url":"https://github.com/faiface/complexity","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/faiface/complexity","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faiface%2Fcomplexity","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faiface%2Fcomplexity/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faiface%2Fcomplexity/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faiface%2Fcomplexity/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/faiface","download_url":"https://codeload.github.com/faiface/complexity/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/faiface%2Fcomplexity/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28794628,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-26T21:49:50.245Z","status":"ssl_error","status_checked_at":"2026-01-26T21:48:29.455Z","response_time":59,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2024-11-08T12:14:05.284Z","updated_at":"2026-01-27T01:06:34.901Z","avatar_url":"https://github.com/faiface.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Complexity\n\nTime/space/anything complexity measurement utility.\n\n## Foreword on asymptotic complexity\n\nAsymptotic complexity is an incredibly important concept in computer\nscience. Algorithms are usually judged by their asymptotic complexity,\nand though other factors are often important too, complexity tends to\nbe the most prevalent one.\n\nTo learn more about asymptotic complexity and big-O notation (used to\nanotate it), visit:\n\n* \u003chttps://en.wikipedia.org/wiki/Big_O_notation\u003e\n* \u003chttps://en.wikipedia.org/wiki/Computational_complexity_theory\u003e\n\n## What is this program for?\n\nEver written an algoritm that was slightly more complicated that a\nsingle for-loop and wanted to know it's time or space complexity, but\nwasn't quite sure how to calculate it?\n\nOr have ever wanted to just quickly prototype different solutions to\nan algorithmic problem and just quickly check their time or space\ncomplexities?\n\nThis utility helps you in precisely these kinds of situations.\n\n## What does this program do?\n\nThis utility calculates the time or space complexity of your for\nyou. All you have to do is to measure a simple table of this form:\n\n|      N |         Time |\n|-------:|-------------:|\n|     10 |   0.04185679 |\n|    100 |   0.24053579 |\n|   1000 |   3.16843691 |\n|  10000 |  41.85855881 |\n| 100000 | 522.87088523 |\n\nThe `N` column represents the size of the input and the `Time` column\nis the time (in whatever unit, e.g. seconds) your program ran for on\nthe specific input.\n\nPut this data into a file, where each line contains exactly two\nnumbers, `N` and `Time`, like this:\n\n```\n10 0.04185679\n100 0.24053579\n1000 3.16843691\n10000 41.85855881\n100000 522.87088523\n```\n\nNow, run the program and see the result!\n\n```\n$ complexity data.txt\nO(n log n)\n```\n\nSeeeeee?\n\n## How does it work?\n\nThis program uses various heurestic methods to search for the right\ncomplexity and verifies the results. Of course, it's not always able\nto find the right complexity, mainly if the running times of your\nprogram are not very consistent. However, it works quite reliably in\nmany cases.\n\n## Why are you talking like it's finished, when it's not?\n\nYaaa, it will be :) Sooooooon...\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaiface%2Fcomplexity","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffaiface%2Fcomplexity","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffaiface%2Fcomplexity/lists"}