{"id":13727307,"url":"https://github.com/zapier/type-system-benchmarks","last_synced_at":"2025-05-07T22:31:03.217Z","repository":{"id":145188820,"uuid":"196441314","full_name":"zapier/type-system-benchmarks","owner":"zapier","description":"Benchmark several type systems and ways to build them (right now Typescript and Flow)","archived":true,"fork":false,"pushed_at":"2020-04-04T23:47:15.000Z","size":204,"stargazers_count":4,"open_issues_count":1,"forks_count":1,"subscribers_count":55,"default_branch":"master","last_synced_at":"2024-11-14T17:48:09.124Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/zapier.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-07-11T17:49:41.000Z","updated_at":"2023-01-28T14:42:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"bfc0090d-5567-4a3d-a7f2-1f4f8bc38e59","html_url":"https://github.com/zapier/type-system-benchmarks","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/zapier%2Ftype-system-benchmarks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Ftype-system-benchmarks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Ftype-system-benchmarks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zapier%2Ftype-system-benchmarks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zapier","download_url":"https://codeload.github.com/zapier/type-system-benchmarks/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252965327,"owners_count":21832875,"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":[],"created_at":"2024-08-03T01:03:49.052Z","updated_at":"2025-05-07T22:31:02.814Z","avatar_url":"https://github.com/zapier.png","language":"TypeScript","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"readme":"# Type System Benchmarks\n\n`type-system-benchmarks` aims to compare the bare performance of Flow and Typescript on real world projects.\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://zappy.zapier.com/68B8F1FA-BE29-4219-9FDD-49A49F2FDCA1.png\" /\u003e\u003cbr\u003e\n  \u003cem\u003eTypescript 3.5 vs Flow 0.102\u003c/em\u003e\n\u003c/p\u003e\n\n## Usage\n\nTo run all the benchmarks:\n\n```\nyarn benchmark\n```\n\n## Apps\n\nApps represent typical JavaScript, Flow or Typescript projects with their respective configurations. Benchmarks are run for each app available in the [apps](apps) directory.\n\nApps names follow the following name convention: `{language}+{variation}`.\n\n`language` can be either `js` or `ts`. Note that TypeScript is represented as a language as it's not only a type system, but a superset of JavaScript.\n\n`variation` is a generic placeholder that represents a given way to integrate one of the type system. `js+flow` represents a basic Flow integration, `ts-babel` represents a Babel integration of Typescript, whereas `ts-tsc` represents a standard Typescript integration using the official compiler.\n\n## Benchmarks\n\nBenchmarks focus on measuring the performance of a specific feature of Flow / Typescript against a given app. Currently there are two benchmarks: **typecheck** and **webpack**.\n\n### Typecheck\n\nThis benchmark measures how bare tools perform to only type checking. This is useful to gauge how a typical IDE integration or CI will perform when type checking.\n\n### Webpack\n\nThis benchmark measures how both tools perform when integrated with Webpack. This is useful to gauge how it affects (re)build times.\n\nIt accepts the following options:\n\n- **useCache** _(default: `false`)_ - If `true` the benchmark will leverage the `cache-loader` and make a first compilation pass to populate its cache. It will then measure the second compilation pass reusing that cache.\n\n- **transpileOnly** _(default: `true`)_ - If `false` the benchmarks will measure both typechecking and transpilation using Webpack. Under the hood it will configure the appropriate loaders to parallelize both operations.\n\n## Code generator\n\nIn order to run benchmarks on apps that simulate a real world example, `type-system-benchmarks` uses a code generator under the hood. Currently it's rather simple and basically generates a bunch of React components.\n\nIt accepts the following options:\n\n- **components** - The number of components to generate.\n- **props** - The number of props per components to generate.\n\n## Benchmarks matrix\n\n`type-system-benchmarks` uses a [matrix.json](matrix.json) file to describe which benchmarks to run against which apps. You can modify this file in order to add/remove bencharmks/apps.\n\nThe file contains 3 sections:\n\n- `apps` - An array of apps name (ie. `ts+babel`).\n- `benchmarks` - An array of benchmarks with optional options (ie. `webpack`). Note that if you want to pass benchmark's option you can use an array like so: `['webpack', { useCache: true }]`.\n- `generatorOptions` - An array of generator options.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapier%2Ftype-system-benchmarks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzapier%2Ftype-system-benchmarks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzapier%2Ftype-system-benchmarks/lists"}