-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Consider replacing prettier with biome for faster formatting #95
Comments
Benchmarking with
Running in the checked out directory of this repo (Ref): ⇒ npx prettier --version
3.1.1
⇒ npx biome --version
Version: 1.4.1
⇒ hyperfine --prepare 'git checkout -- unpacked/' 'npx prettier --write unpacked/' 'npx biome format --write unpacked/'
Benchmark 1: npx prettier --write unpacked/
Time (mean ± σ): 13.243 s ± 0.675 s [User: 21.156 s, System: 1.210 s]
Range (min … max): 12.380 s … 14.071 s 10 runs
Benchmark 2: npx biome format --write unpacked/
Time (mean ± σ): 1.514 s ± 0.135 s [User: 3.343 s, System: 0.364 s]
Range (min … max): 1.384 s … 1.775 s 10 runs
Summary
npx biome format --write unpacked/ ran
8.75 ± 0.90 times faster than npx prettier --write unpacked/ Config I used: How that changed the formatted output:
Based on the speed+formatting improvements, I ended up switching my repo over to using it: |
Thanks. I'm benchmarking and improving the performance recently. This can be a good replacement for prettier. I will test it soon. Before switching to biome, I will have to refactor the transformation to allow async function. Update: biome's format function is not async. There is no dependency.👍 |
I just tested |
I'm also considering using |
Hadn't come across that one before; sounds interesting:
Would be interested to see how it performs speed-wise for comparable formatting. |
The text was updated successfully, but these errors were encountered: