Skip to content

Commit 385d534

Browse files
committed
chore: wip
1 parent 9a72e1e commit 385d534

File tree

10 files changed

+1861
-157
lines changed

10 files changed

+1861
-157
lines changed

README.md

Lines changed: 40 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,14 +259,48 @@ bun test --watch
259259

260260
## Performance
261261

262-
Headwind is designed for speed. Here are some benchmarks from our test suite:
262+
Headwind is designed for speed. We've benchmarked against other popular utility-first CSS frameworks to demonstrate our performance advantages.
263+
264+
### Benchmark Results
265+
266+
Our comprehensive benchmark suite compares Headwind with other popular utility-first CSS frameworks. **Headwind WINS ALL 10/10 CATEGORIES!** 🏆🔥
267+
268+
| Scenario | Headwind | UnoCSS | Tailwind v3 | Tailwind v4 | Performance |
269+
|----------|----------|---------|-------------|-------------|-------------|
270+
| **Simple Utilities** (10 classes) | **6.20µs** | 17.49µs | 8.12ms | 21.78ms | **Headwind: 2.8x faster than UnoCSS, 1,310x faster than v3, 3,513x faster than v4**|
271+
| **Complex Utilities** (11 classes) | **10.17µs** | 23.69µs | 7.76ms | 21.37ms | **Headwind: 2.3x faster than UnoCSS, 763x faster than v3, 2,101x faster than v4**|
272+
| **Arbitrary Values** (7 classes) | **3.03µs** | 25.87µs | 7.76ms | 20.90ms | **Headwind: 8.5x faster than UnoCSS, 2,561x faster than v3, 6,897x faster than v4**|
273+
| **Real-world Components** (6 strings) | **7.59µs** | 98.78µs | 147.22ms | 124.23ms | **Headwind: 13x faster than UnoCSS, 19,397x faster than v3, 16,369x faster than v4**|
274+
| **Large Scale** (1000 utilities) | **259.23µs** | 404.17µs | 7.95ms | 20.94ms | **Headwind: 1.6x faster than UnoCSS, 31x faster than v3, 81x faster than v4**|
275+
| **CSS Output** (1000 rules) | **558.03µs** | 69.23ms | 8.11ms | 21.33ms | **Headwind: 124x faster than UnoCSS, 15x faster than v3, 38x faster than v4**|
276+
| **Color Utilities** (240 classes) | **206.40µs** | 304.94µs | 7.88ms | 20.90ms | **Headwind: 1.5x faster than UnoCSS, 38x faster than v3, 101x faster than v4**|
277+
| **Responsive** (1000 classes) | **519.39µs** | 659.12µs | 7.94ms | 20.20ms | **Headwind: 1.3x faster than UnoCSS, 15x faster than v3, 39x faster than v4**|
278+
| **Interactive States** (550 classes) | **567.40µs** | 915.33µs | 8.25ms | 21.42ms | **Headwind: 1.6x faster than UnoCSS, 15x faster than v3, 38x faster than v4**|
279+
| **Duplicate Handling** (6000 items) | **31.24µs** | 1.61ms | 8.54ms | 22.17ms | **Headwind: 52x faster than UnoCSS, 273x faster than v3, 710x faster than v4**|
280+
281+
**Key Takeaways:**
282+
- **🏆 HEADWIND WINS ALL 10/10 CATEGORIES vs UnoCSS, Tailwind v3, AND Tailwind v4! 🏆**
283+
- **Real-world components**: Up to 19,397x faster than Tailwind v3 - Dominant performance for actual usage
284+
- **Duplicate handling**: 710x faster than Tailwind v4, 273x faster than v3, 52x faster than UnoCSS
285+
- **Simple utilities**: 3,513x faster than Tailwind v4, 1,310x faster than v3, 2.8x faster than UnoCSS
286+
- **CSS output generation**: 124x faster than UnoCSS, 38x faster than Tailwind v4, 15x faster than v3
287+
- **Consistently faster**: Beats all frameworks across all 10 benchmark categories
288+
- **Production-ready performance**: Optimized for real-world applications with complex component patterns
289+
290+
### Running Benchmarks
291+
292+
You can run the benchmarks yourself to see the performance on your hardware:
263293

264-
- **Simple utilities**: ~7ms for 1,000 utilities
265-
- **Complex utilities** (with variants): ~9ms for 1,000 utilities
266-
- **Arbitrary values**: ~3ms for 1,000 utilities
267-
- **CSS output**: ~1ms for 1,000 rules
294+
```bash
295+
# Run the comprehensive benchmark suite
296+
bun run benchmark
297+
298+
# Or run from the packages/headwind directory
299+
cd packages/headwind
300+
bun run benchmark
301+
```
268302

269-
All benchmarks run on Bun runtime. Your results may vary based on hardware.
303+
All benchmarks use [Mitata](https://github.com/evanwashere/mitata) for accurate measurements and run on Bun runtime. Results may vary based on your hardware.
270304

271305
## Development
272306

bun.lock

Lines changed: 362 additions & 25 deletions
Large diffs are not rendered by default.

docs/.vitepress/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ const sidebar = [
7979
{ text: 'Framework Integration', link: '/advanced/frameworks' },
8080
],
8181
},
82+
{ text: 'Performance Benchmarks', link: '/benchmarks' },
8283
{ text: 'API Reference', link: '/api-reference' },
8384
{ text: 'Showcase', link: '/showcase' },
8485
]

0 commit comments

Comments
 (0)