{"id":21004772,"url":"https://github.com/halfzebra/tail-recursion-benchmark","last_synced_at":"2026-05-20T06:39:54.514Z","repository":{"id":40790685,"uuid":"192095300","full_name":"halfzebra/tail-recursion-benchmark","owner":"halfzebra","description":"🧪 JavaScript benchmark for tail recursion optimisation","archived":false,"fork":false,"pushed_at":"2023-10-23T16:17:41.000Z","size":206,"stargazers_count":1,"open_issues_count":17,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T10:14:04.143Z","etag":null,"topics":["benchmark","javascript","recursion"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","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/halfzebra.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-15T15:38:25.000Z","updated_at":"2023-07-27T12:05:29.000Z","dependencies_parsed_at":"2023-01-21T09:02:42.107Z","dependency_job_id":"71201858-4331-43a5-b2b1-073c0197a406","html_url":"https://github.com/halfzebra/tail-recursion-benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfzebra%2Ftail-recursion-benchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfzebra%2Ftail-recursion-benchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfzebra%2Ftail-recursion-benchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/halfzebra%2Ftail-recursion-benchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/halfzebra","download_url":"https://codeload.github.com/halfzebra/tail-recursion-benchmark/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243419559,"owners_count":20287910,"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":["benchmark","javascript","recursion"],"created_at":"2024-11-19T08:37:51.335Z","updated_at":"2025-12-29T07:05:50.376Z","avatar_url":"https://github.com/halfzebra.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tail-recursion-benchmark\n\nThis repo with a benchmark of [Factorial](https://en.wikipedia.org/wiki/Factorial) with tail recursion optimisation.\n\nI wanted to see how fast tail-recursive functions are compared to the implementation using loops in JavaScript.\n\n## Run locally\n\n```sh\nnpm install\nnpm bench\n```\n\n## Results\n\n```sh\nrecursive x 1,164 ops/sec ±0.89% (89 runs sampled)\ntailRecursive x 707,965 ops/sec ±0.60% (91 runs sampled)\nloop x 3,503,258 ops/sec ±0.62% (89 runs sampled)\nFastest is loop\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfzebra%2Ftail-recursion-benchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhalfzebra%2Ftail-recursion-benchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhalfzebra%2Ftail-recursion-benchmark/lists"}