Skip to content

Commit

Permalink
docs(readme): update
Browse files Browse the repository at this point in the history
  • Loading branch information
unadlib committed Dec 21, 2024
1 parent 05123d5 commit 6a57f5f
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,23 @@ The fastest method is Coaction,Zustand

According to the provided performance data, Coaction's performance is comparable to Zustand's performance. However, Coaction with Mutative demonstrates a significant performance advantage compared to Zustand with Immer.

While standard Coaction achieves approximately 5,272 operations per second (ops/sec) and standard Zustand reaches around 5,233 ops/sec, the most striking difference is observed with Zustand with Immer, which drastically drops to a mere 253 ops/sec. Furthermore, Coaction with Mutative achieves around 4,626 ops/sec. This means Coaction with Mutative is approximately 18.3 times faster than Zustand with Immer (4626 / 253 ≈ 18.3). The data clearly indicates that Coaction offers superior performance characteristics compared to Zustand, and this advantage is especially pronounced when contrasted with Zustand's Immer implementation.
While standard Coaction achieves approximately 5,272 (ops/sec) and standard Zustand reaches around 5,233 (ops/sec), the most striking difference is observed with Zustand with Immer, which drastically drops to a mere 253 ops/sec. Furthermore, Coaction with Mutative achieves around 4,626 ops/sec. This means Coaction with Mutative is approximately 18.3 faster than Zustand with Immer (4626 / 253 ≈ 18.3). The data clearly indicates that Coaction offers superior performance characteristics compared to Zustand, and this advantage is especially pronounced when contrasted with Zustand's Immer implementation.

> We will also provide more complete benchmarking.
## Difference between Coaction and Zustand

| | `coaction` | Zustand |
| --------------------------------- | ---------- | ------- |
| Built-in multithreading |||
| Support getter accessor |||
| Built-in computed properties |||
| Built-in namespace Slice |||
| Built-in auto selector for state |||
| Built-in multiple stores selector |||
| Easy to implement middleware |||
| Support `this` in getter/action |||

## Installation

You can install `@coaction/react` for React application via npm, yarn, or pnpm.
Expand Down Expand Up @@ -249,19 +262,6 @@ Coaction is designed to be compatible with a wide range of libraries and framewo
| Persist | @coaction/persist | Ongoing |
| Undo/Redo | @coaction/history | Ongoing |
## Difference between Coaction and Zustand
| | `coaction` | Zustand |
| --------------------------------- | ---------- | ------- |
| Built-in multithreading | ✅ | ❌ |
| Support getter accessor | ✅ | ❌ |
| Built-in computed properties | ✅ | ❌ |
| Built-in namespace Slice | ✅ | ❌ |
| Built-in auto selector for state | ✅ | ❌ |
| Built-in multiple stores selector | ✅ | ❌ |
| Easy to implement middleware | ✅ | ❌ |
| Support `this` in getter/action | ✅ | ❌ |
## Credits
- Coaction's concept is inspired by [Partytown](https://partytown.qwik.dev/).
Expand Down

0 comments on commit 6a57f5f

Please sign in to comment.