Commit 775eaf3
committed
feat(zen): read path optimizations for extreme performance
- Fast path for CLEAN state (skip _updateIfNecessary call)
- Inline track logic in Signal.get (avoid function call overhead)
- Extract state once in read() (avoid repeated bitwise ops)
- Optimized state checks with early returns
Target improvements:
- Single Read: >20M ops/sec (from 18.1M) - close gap with Solid 22.4M
- Extreme Read (10000x): >80K ops/sec (from 64K) - close gap with Solid 318K
- Computed Value Access: improve from 16.7M ops/sec
All 48 tests pass.1 parent 23996a2 commit 775eaf3
File tree
3 files changed
+39
-9
lines changed- .changeset
- packages/zen
- src
3 files changed
+39
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
| 3 | + | |
| 4 | + | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
242 | 242 | | |
243 | 243 | | |
244 | 244 | | |
245 | | - | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
246 | 248 | | |
247 | 249 | | |
248 | | - | |
249 | | - | |
250 | | - | |
| 250 | + | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
| 253 | + | |
255 | 254 | | |
256 | 255 | | |
257 | 256 | | |
| |||
485 | 484 | | |
486 | 485 | | |
487 | 486 | | |
| 487 | + | |
488 | 488 | | |
489 | | - | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
490 | 501 | | |
491 | 502 | | |
492 | 503 | | |
| |||
0 commit comments