{"id":24738623,"url":"https://github.com/zweifisch/benchmark","last_synced_at":"2026-05-09T05:32:06.748Z","repository":{"id":57170632,"uuid":"197899255","full_name":"zweifisch/benchmark","owner":"zweifisch","description":null,"archived":false,"fork":false,"pushed_at":"2019-07-20T10:02:20.000Z","size":2,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-27T21:40:31.146Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/zweifisch.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-07-20T08:02:31.000Z","updated_at":"2019-07-20T10:02:22.000Z","dependencies_parsed_at":"2022-08-27T12:02:06.504Z","dependency_job_id":null,"html_url":"https://github.com/zweifisch/benchmark","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zweifisch/benchmark","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fbenchmark","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fbenchmark/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fbenchmark/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fbenchmark/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zweifisch","download_url":"https://codeload.github.com/zweifisch/benchmark/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zweifisch%2Fbenchmark/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32808416,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"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":[],"created_at":"2025-01-27T22:55:04.158Z","updated_at":"2026-05-09T05:32:06.707Z","avatar_url":"https://github.com/zweifisch.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# benchmark\n\n```sh\nnpm i @zf/benchmark\n```\n\n```js\nconst {compare} = require('@zf/benchmark')\n\nconst range = (n) =\u003e {\n  const ret = []\n  for(let i = 0; i \u003c n; i ++) {\n    ret.push(i)\n  }\n  return ret\n}\n\nconst range2 = (n) =\u003e [...new Array(n)].map((x, index) =\u003e index)\n\ncompare([\n  'range(10)', [10], {\n    range,\n    range2, \n  },\n  'range(100)', [100], {\n    range,\n    range2, \n  },\n])\n```\n\noutput\n\n```\nrange(10)\n  round #1\n   5,221,533                range     4,288k\n   1,302,409               range2     4,548k\n  round #2\n   5,179,243                range     4,308k\n   1,301,607               range2     4,292k\n  round #3\n   5,189,398                range     4,288k\n   1,228,595               range2     4,356k\n  summary\n   5,196,724 100.00%    5,179,243 100.00% range\n   1,277,537  24.58%    1,301,607  25.13% range2\nrange(100)\n  round #1\n   1,853,410                range     4,612k\n     195,481               range2     4,356k\n  round #2\n   1,859,328                range     4,676k\n     192,886               range2     4,376k\n  round #3\n   1,862,931                range     4,744k\n     192,183               range2     4,284k\n  summary\n   1,858,556 100.00%    1,859,328 100.00% range\n     193,516  10.41%      192,886  10.37% range2\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fbenchmark","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzweifisch%2Fbenchmark","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzweifisch%2Fbenchmark/lists"}