Skip to content

Commit

Permalink
Merge pull request #101 from line/docs/update-benchmark
Browse files Browse the repository at this point in the history
docs: update benchmark
  • Loading branch information
kazushisan authored Dec 15, 2024
2 parents cfb1d72 + ce83ae7 commit 83a7f3b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,13 +218,13 @@ tsr's behavior is clear by design. TypeScript is used to detect modules in your

tsr is designed to be minimal and serve a single purpose. The install size is substantially smaller. Also, tsr is runtime dependent, not relying on `@types/node`.

| tsr | Knip |
| ----- | ------ |
| tsr | Knip |
| ---- | ------ |
| 98kB | 5.86MB |

#### Better Performance

Our benchmark shows that tsr is 2.5x faster compared to Knip 🚀 (see `benchmark/vue_core.sh` for details)
Our benchmark shows that tsr is 2.14x faster compared to Knip 🚀 (see `benchmark/vue_core.sh` for details)

<img width="400" src="./media/comparison.png" alt="benchmark of tsr and Knip" />

Expand All @@ -234,14 +234,14 @@ tsr provides `---recursive` option which will edit your files until there are no

#### Key Differences

| Feature | tsr | Knip |
| ------------------------ | ------------------------------ | ------------------------------------------ |
| **Automatic Editing** | ✅ Comprehensive | Limited |
| **Zero Configuration** | ✅ Works with `tsconfig.json` | Requires a config file for correct results |
| **Predictable Behavior** | ✅ TypeScript-based logic | Assumptions for project structure |
| Feature | tsr | Knip |
| ------------------------ | ----------------------------- | ------------------------------------------ |
| **Automatic Editing** | ✅ Comprehensive | Limited |
| **Zero Configuration** | ✅ Works with `tsconfig.json` | Requires a config file for correct results |
| **Predictable Behavior** | ✅ TypeScript-based logic | Assumptions for project structure |
| **Install Size** | ✅ 98kB, minimal dependencies | 5.86MB, requires `@types/node` |
| **Performance** | ✅ 2.5x faster | |
| **Recursive Editing** |`--recursive` option | |
| **Performance** | ✅ 2.14x faster | |
| **Recursive Editing** |`--recursive` option | |

## Examples

Expand Down
Binary file modified media/comparison.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 83a7f3b

Please sign in to comment.