{"id":19303436,"url":"https://github.com/johennes/swift-performance-playground","last_synced_at":"2025-09-19T22:09:15.625Z","repository":{"id":142397925,"uuid":"299398258","full_name":"Johennes/swift-performance-playground","owner":"Johennes","description":"Swift Playground for visualizing algorithm time complexity","archived":false,"fork":false,"pushed_at":"2020-10-06T18:10:30.000Z","size":436,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-22T06:53:02.996Z","etag":null,"topics":["performance-measurement","playground","swift","time-complexity-visualization"],"latest_commit_sha":null,"homepage":"","language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Johennes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2020-09-28T18:31:46.000Z","updated_at":"2021-08-24T17:53:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"6d1ed364-6d82-4b25-9b92-b434cbae3346","html_url":"https://github.com/Johennes/swift-performance-playground","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Johennes/swift-performance-playground","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johennes%2Fswift-performance-playground","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johennes%2Fswift-performance-playground/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johennes%2Fswift-performance-playground/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johennes%2Fswift-performance-playground/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Johennes","download_url":"https://codeload.github.com/Johennes/swift-performance-playground/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Johennes%2Fswift-performance-playground/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":276010717,"owners_count":25569833,"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-09-19T02:00:09.700Z","response_time":108,"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":["performance-measurement","playground","swift","time-complexity-visualization"],"created_at":"2024-11-09T23:26:22.002Z","updated_at":"2025-09-19T22:09:15.577Z","avatar_url":"https://github.com/Johennes.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"Swift Performance Playground\n============================\n\nThis is a skeleton Swift Playground for visualizing the time complexity of\nalgorithms.\n\n![Playground and resulting chart for two example algorithms]\n\nUsage\n-----\n\nTo see a working example, open `Performance.playground` and scroll to the\nbottom. Once you run the Playground (`CMD + SHIFT + RET`), the resulting time\nchart (plotting time in seconds over the input size) will start drawing in the\nlive view.\n\nTo test your own algorithms, customize the contents of the `Chart Display` and\n`Measurements` sections.\n\nMeasurements are driven by an input data specification. The following is an\nexample specification that steps from 1 to 1,000,000 multiplying the current\nsize by 4 in each step and returning an accordingly sized randomized array of\nintegers.\n\n``` {.swift}\nlet input = Timekeeper.InputSpec(\n    minSize: 1,\n    maxSize: 1000000,\n    step: { $0 * 4 }) { inputSize in\n        (0..\u003cinputSize).shuffled()\n    }\n```\n\nThe specification is then handed to the time keeper together with the algorithm\nto be measured.\n\n``` {.swift}\ntimekeeper.measure(input: input, blocks: [\n    { data in\n        _ = data.sorted()\n    }\n])\n```\n\nTodo List\n---------\n\n-   Add labels \u0026 grid lines in non-logarithmic mode\n-   Add a legend\n\nKnown Issues\n------------\n\nOccasionally and especially when choosing two large inputs the Playground will\nhang and refuse to restart. You'll have to force-kill and relaunch Xcode in this\ncase.\n\nLicense\n-------\n\nSwift Performance Playground is licensed under the GNU General Public License as\npublished by the Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\n  [Playground and resulting chart for two example algorithms]: screenshot.png\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohennes%2Fswift-performance-playground","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohennes%2Fswift-performance-playground","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohennes%2Fswift-performance-playground/lists"}