{"id":15011723,"url":"https://github.com/preactjs/benchmarks","last_synced_at":"2026-02-07T10:31:17.528Z","repository":{"id":66140780,"uuid":"579220227","full_name":"preactjs/benchmarks","owner":"preactjs","description":"A collection of benchmarks for Preact","archived":false,"fork":false,"pushed_at":"2025-01-14T17:43:26.000Z","size":211,"stargazers_count":1,"open_issues_count":5,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-10-19T02:55:31.499Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/preactjs.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},"funding":{"github":["preactjs"],"open_collective":"preact"}},"created_at":"2022-12-17T01:03:42.000Z","updated_at":"2025-08-11T06:27:00.000Z","dependencies_parsed_at":"2024-04-16T22:51:45.133Z","dependency_job_id":"17096196-14c4-4cfe-bae2-d23695515b1b","html_url":"https://github.com/preactjs/benchmarks","commit_stats":{"total_commits":100,"total_committers":2,"mean_commits":50.0,"dds":0.06000000000000005,"last_synced_commit":"0e3f96775fc12229ee91761b15547aa7b297393c"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/preactjs/benchmarks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fbenchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fbenchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fbenchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fbenchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/preactjs","download_url":"https://codeload.github.com/preactjs/benchmarks/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/preactjs%2Fbenchmarks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29192613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-07T07:37:03.739Z","status":"ssl_error","status_checked_at":"2026-02-07T07:37:03.029Z","response_time":63,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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-09-24T19:41:30.472Z","updated_at":"2026-02-07T10:31:17.511Z","avatar_url":"https://github.com/preactjs.png","language":"JavaScript","funding_links":["https://github.com/sponsors/preactjs","https://opencollective.com/preact"],"categories":[],"sub_categories":[],"readme":"# Preact Benchmarks\n\nA collection of benchmarks for Preact and its ecosystem of libraries.\n\nThe `apps` directory contains a bunch of apps that can be benchmarked. Each directory under an `apps` contains HTML files that are the benchmarks for that app. Inside an `apps` folders are implementations of that app using different Preact libraries (e.g. class components, hooks, compat, signals). The `dependencies` directory contains different versions of Preact and its ecosystem libraries. The `cli` directory contains a command line interface to run benchmarks. You can specify using options to the cli for this repository which implementation and dependency version to use for a benchmark.\n\n## Getting started\n\n1. Clone this repository\n2. Run `pnpm install`\n3. Run `pnpm start` to start the benchmark server\n\nUse the benchmark server to development/modify a benchmark implementation. The server will automatically reload the benchmark when you make changes files.\n\n## Running benchmarks\n\n1. Run `pnpm bench` to run a benchmark\n2. Follow the prompts to select which implementation and dependency versions to compare\n\nRun `pnpm bench --help` to see all available options.\n\n```text\n$ pnpm bench --help\n\n  Description\n    Run the given benchmark using the specified implementation with the specified dependencies.\n    If no benchmark file, no dependencies, or no implementations are specified, will prompt for one.\n\n  Usage\n    $ preact-bench bench [benchmark_file] [options]\n\n  Options\n    --interactive        Prompt for options. Defaults to true of no benchmark file,\n\t\t                     dependencies, or implementations are specified  (default false)\n    -d, --dependency     What group of dependencies (comma-delimited) and version to\n\t\t                     use for a run of the benchmark (package@version)  (default latest)\n    -i, --impl           What implementation of the benchmark to run  (default preact-class)\n    -n, --sample-size    Minimum number of times to run each benchmark  (default 25)\n    -h, --horizon        The degrees of difference to try and resolve when auto-sampling\n\t\t                     (\"N%\" or \"Nms\", comma-delimited)  (default 5%)\n    -t, --timeout        Maximum number of minutes to spend auto-sampling  (default 1)\n    --trace              Enable performance tracing (Chrome only)  (default false)\n    --debug              Enable debug logging  (default false)\n    -b, --browser        Which browser to run the benchmarks in: chrome, chrome-headless,\n\t\t                     firefox, firefox-headless, safari, edge  (default chrome-headless)\n    -p, --port           What port to run the benchmark server on  (default 5173)\n    -h, --help           Displays this message\n\n  Examples\n    $ preact-bench bench\n    $ preact-bench bench apps/todo/todo.html\n    $ preact-bench bench apps/todo/todo.html -d preact@local -d preact@latest\n    $ preact-bench bench apps/todo/todo.html -d preact@local -d preact@main -i preact-hooks\n    $ preact-bench bench apps/todo/todo.html -d preact@local,signals@local -d preact@main,signals@local -i preact-signals -n 2 -t 0\n    $ preact-bench bench apps/todo/todo.html -d preact@local -d preact@main --trace\n```\n\n## Benchmarking within another repository\n\nThis repository is intended to be included as a submodule in another repository. This allows you to run benchmarks against local changes in that repository. The `dev` script in this repository starts a benchmarking dev server that is useful when benchmarking changes in another repository.\n\n```\n$ pnpm dev --help\n\nDescription\n    Run a dev server to interactively run a benchmark while developing changes\n\n  Usage\n    $ preact-bench dev [benchmark_file] [options]\n\n  Options\n    --interactive        Prompt for options  (default false)\n    -d, --dependency     What group of dependencies (comma-delimited) and version to\n\t\t                     use for a run of the benchmark (package@version)  (default latest)\n    -i, --impl           What implementation of the benchmark to run  (default preact-class)\n    -n, --sample-size    Minimum number of times to run each benchmark  (default 25)\n    -h, --horizon        The degrees of difference to try and resolve when auto-sampling\n\t\t                     (\"N%\" or \"Nms\", comma-delimited)  (default 5%)\n    -t, --timeout        Maximum number of minutes to spend auto-sampling  (default 1)\n    --trace              Enable performance tracing (Chrome only)  (default false)\n    --debug              Enable debug logging  (default false)\n    -b, --browser        Which browser to run the benchmarks in: chrome, chrome-headless,\n\t\t                     firefox, firefox-headless, safari, edge  (default chrome-headless)\n    -p, --port           What port to run the benchmark server on  (default 5173)\n    -h, --help           Displays this message\n\n  Examples\n    $ preact-bench dev apps/todo/todo.html -d preact@local -d preact@main -i preact-hooks\n    $ preact-bench dev apps/todo/todo.html -d preact@local -d preact@local-pinned -i preact-hooks\n```\n\nThis command shares the same options as the `bench` command. Once you start the server you can press `b⏎` to re-build your local Preact repository (or whatever repository this is within) and re-run the configured benchmarks.\n\n```text\n$ pnpm dev apps/many-updates/many-updates.html -i preact -d preact@local -d preact@local-pinned -n 2 -t 0\n\n\u003e @preact/benchmarks@0.0.1 dev /Users/andre_wiggins/github/preactjs/preact-v10/benchmarks\n\u003e node cli/bin/preact-bench.js dev \"apps/many-updates/many-updates.html\" \"-i\" \"preact\" \"-d\" \"preact@local\" \"-d\" \"preact@local-pinned\" \"-n\" \"2\" \"-t\" \"0\"\n\n  ➜  Local:   http://localhost:5173/\n  ➜  Network: use --host to expose\n  ➜  press p + enter Pin current local changes into local-pinned\n  ➜  press b + enter run Benchmarks\n  ➜  press h + enter show help\n\n```\n\nYou can also press the `p⏎` key to build your local repos changes and copy them into the relevant `local-pinned` directory. This command is useful when you want to compare different local changes against each other.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fbenchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpreactjs%2Fbenchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpreactjs%2Fbenchmarks/lists"}