Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit556e0b1

Browse files
committed
docs(benchmark): update benchmark for mutative v1.0.9
1 parenta38f0dc commit556e0b1

File tree

8 files changed

+44
-44
lines changed

8 files changed

+44
-44
lines changed

‎README.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -110,23 +110,23 @@ Mutative is up to 6x faster than naive handcrafted reducer for updating immutabl
110110

111111
>Mutative passed all of Immer's test cases.
112112
113-
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.5 vs Immer v10.1.1]
113+
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.9 vs Immer v10.1.1]
114114

115115
![Benchmark](benchmark.jpg)
116116

117117
```
118-
Naive handcrafted reducer - No Freeze x 4,442 ops/sec ±0.38% (95 runs sampled)
119-
Mutative - No Freeze x 6,199 ops/sec ±0.79% (89 runs sampled)
120-
Immer - No Freeze x 5.30 ops/sec ±0.38% (18 runs sampled)
118+
Naive handcrafted reducer - No Freeze x 4,447 ops/sec ±0.85% (96 runs sampled)
119+
Mutative - No Freeze x 6,246 ops/sec ±1.29% (92 runs sampled)
120+
Immer - No Freeze x 5.26 ops/sec ±0.56% (18 runs sampled)
121121
122-
Mutative - Freeze x974 ops/sec ±1.77% (92 runs sampled)
123-
Immer - Freeze x376 ops/sec ±0.67% (92 runs sampled)
122+
Mutative - Freeze x950 ops/sec ±0.95% (96 runs sampled)
123+
Immer - Freeze x377 ops/sec ±0.37% (93 runs sampled)
124124
125-
Mutative - Patches and No Freeze x969 ops/sec ±0.99% (97 runs sampled)
126-
Immer - Patches and No Freeze x 5.27 ops/sec ±0.36% (18 runs sampled)
125+
Mutative - Patches and No Freeze x978 ops/sec ±0.16% (97 runs sampled)
126+
Immer - Patches and No Freeze x 5.23 ops/sec ±0.25% (18 runs sampled)
127127
128-
Mutative - Patches and Freeze x514 ops/sec ±0.97% (95 runs sampled)
129-
Immer - Patches and Freeze x275 ops/sec ±0.74% (89 runs sampled)
128+
Mutative - Patches and Freeze x504 ops/sec ±1.01% (94 runs sampled)
129+
Immer - Patches and Freeze x272 ops/sec ±0.83% (89 runs sampled)
130130
131131
The fastest method is Mutative - No Freeze
132132
```
@@ -137,7 +137,7 @@ Run `yarn benchmark` to measure performance.
137137
138138
Immer relies on auto-freeze to be enabled, if auto-freeze is disabled, Immer will have a huge performance drop and Mutative will have a huge performance lead, especially with large data structures it will have a performance lead of more than 50x.
139139

140-
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,199 ops/sec`) and Immer (`376 ops/sec`).
140+
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,246 ops/sec`) and Immer (`377 ops/sec`).
141141

142142
Overall, Mutative has a huge performance lead over Immer in[more performance testing scenarios](https://github.com/unadlib/mutative/tree/main/test/performance). Run`yarn performance` to get all the performance results locally.
143143

‎benchmark-array.jpg‎

1.21 KB
Loading

‎benchmark-class.jpg‎

-659 Bytes
Loading

‎benchmark-object.jpg‎

560 Bytes
Loading

‎benchmark.jpg‎

127 Bytes
Loading

‎website/blog/releases/1.0/index.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -81,23 +81,23 @@ const state = create(baseState, (draft) => {
8181

8282
>Mutative passed all of Immer's test cases.
8383
84-
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.5 vs Immer v10.1.1]
84+
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.9 vs Immer v10.1.1]
8585

8686
![Benchmark](img/benchmark.jpg)
8787

8888
```
89-
Naive handcrafted reducer - No Freeze x 4,442 ops/sec ±0.38% (95 runs sampled)
90-
Mutative - No Freeze x 6,199 ops/sec ±0.79% (89 runs sampled)
91-
Immer - No Freeze x 5.30 ops/sec ±0.38% (18 runs sampled)
89+
Naive handcrafted reducer - No Freeze x 4,447 ops/sec ±0.85% (96 runs sampled)
90+
Mutative - No Freeze x 6,246 ops/sec ±1.29% (92 runs sampled)
91+
Immer - No Freeze x 5.26 ops/sec ±0.56% (18 runs sampled)
9292
93-
Mutative - Freeze x974 ops/sec ±1.77% (92 runs sampled)
94-
Immer - Freeze x376 ops/sec ±0.67% (92 runs sampled)
93+
Mutative - Freeze x950 ops/sec ±0.95% (96 runs sampled)
94+
Immer - Freeze x377 ops/sec ±0.37% (93 runs sampled)
9595
96-
Mutative - Patches and No Freeze x969 ops/sec ±0.99% (97 runs sampled)
97-
Immer - Patches and No Freeze x 5.27 ops/sec ±0.36% (18 runs sampled)
96+
Mutative - Patches and No Freeze x978 ops/sec ±0.16% (97 runs sampled)
97+
Immer - Patches and No Freeze x 5.23 ops/sec ±0.25% (18 runs sampled)
9898
99-
Mutative - Patches and Freeze x514 ops/sec ±0.97% (95 runs sampled)
100-
Immer - Patches and Freeze x275 ops/sec ±0.74% (89 runs sampled)
99+
Mutative - Patches and Freeze x504 ops/sec ±1.01% (94 runs sampled)
100+
Immer - Patches and Freeze x272 ops/sec ±0.83% (89 runs sampled)
101101
102102
The fastest method is Mutative - No Freeze
103103
```
@@ -108,7 +108,7 @@ Run `yarn benchmark` to measure performance.
108108
109109
Immer relies on auto-freeze to be enabled, if auto-freeze is disabled, Immer will have a huge performance drop and Mutative will have a huge performance lead, especially with large data structures it will have a performance lead of more than 50x.
110110

111-
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,199 ops/sec`) and Immer (`376 ops/sec`).
111+
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,246 ops/sec`) and Immer (`377 ops/sec`).
112112

113113
Overall, Mutative has a huge performance lead over Immer in[more performance testing scenarios](https://github.com/unadlib/mutative/tree/main/test/performance).
114114

‎website/docs/extra-topics/comparison-with-immer.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,23 +25,23 @@ Mutative has fewer bugs such as accidental draft escapes than Immer, [view detai
2525

2626
>Mutative passed all of Immer's test cases.
2727
28-
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.5 vs Immer v10.1.1]
28+
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.9 vs Immer v10.1.1]
2929

3030
![Benchmark](img/benchmark.jpg)
3131

3232
```
33-
Naive handcrafted reducer - No Freeze x 4,442 ops/sec ±0.38% (95 runs sampled)
34-
Mutative - No Freeze x 6,199 ops/sec ±0.79% (89 runs sampled)
35-
Immer - No Freeze x 5.30 ops/sec ±0.38% (18 runs sampled)
33+
Naive handcrafted reducer - No Freeze x 4,447 ops/sec ±0.85% (96 runs sampled)
34+
Mutative - No Freeze x 6,246 ops/sec ±1.29% (92 runs sampled)
35+
Immer - No Freeze x 5.26 ops/sec ±0.56% (18 runs sampled)
3636
37-
Mutative - Freeze x974 ops/sec ±1.77% (92 runs sampled)
38-
Immer - Freeze x376 ops/sec ±0.67% (92 runs sampled)
37+
Mutative - Freeze x950 ops/sec ±0.95% (96 runs sampled)
38+
Immer - Freeze x377 ops/sec ±0.37% (93 runs sampled)
3939
40-
Mutative - Patches and No Freeze x969 ops/sec ±0.99% (97 runs sampled)
41-
Immer - Patches and No Freeze x 5.27 ops/sec ±0.36% (18 runs sampled)
40+
Mutative - Patches and No Freeze x978 ops/sec ±0.16% (97 runs sampled)
41+
Immer - Patches and No Freeze x 5.23 ops/sec ±0.25% (18 runs sampled)
4242
43-
Mutative - Patches and Freeze x514 ops/sec ±0.97% (95 runs sampled)
44-
Immer - Patches and Freeze x275 ops/sec ±0.74% (89 runs sampled)
43+
Mutative - Patches and Freeze x504 ops/sec ±1.01% (94 runs sampled)
44+
Immer - Patches and Freeze x272 ops/sec ±0.83% (89 runs sampled)
4545
4646
The fastest method is Mutative - No Freeze
4747
```
@@ -52,7 +52,7 @@ Run `yarn benchmark` to measure performance.
5252
5353
Immer relies on auto-freeze to be enabled, if auto-freeze is disabled, Immer will have a huge performance drop and Mutative will have a huge performance lead, especially with large data structures it will have a performance lead of more than 50x.
5454

55-
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,199 ops/sec`) and Immer (`376 ops/sec`).
55+
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,246 ops/sec`) and Immer (`377 ops/sec`).
5656

5757
Overall, Mutative has a huge performance lead over Immer in[more performance testing scenarios](https://github.com/unadlib/mutative/tree/main/test/performance). Run`yarn performance` to get all the performance results locally.
5858

‎website/docs/getting-started/performance.md‎

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -69,23 +69,23 @@ const state = create(baseState, (draft) => {
6969

7070
>Mutative passed all of Immer's test cases.
7171
72-
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.5 vs Immer v10.1.1]
72+
Measure(ops/sec) to update 50K arrays and 1K objects, bigger is better([view source](https://github.com/unadlib/mutative/blob/main/test/performance/benchmark.ts)).[Mutative v1.0.9 vs Immer v10.1.1]
7373

7474
![Benchmark](img/benchmark.jpg)
7575

7676
```
77-
Naive handcrafted reducer - No Freeze x 4,442 ops/sec ±0.38% (95 runs sampled)
78-
Mutative - No Freeze x 6,199 ops/sec ±0.79% (89 runs sampled)
79-
Immer - No Freeze x 5.30 ops/sec ±0.38% (18 runs sampled)
77+
Naive handcrafted reducer - No Freeze x 4,447 ops/sec ±0.85% (96 runs sampled)
78+
Mutative - No Freeze x 6,246 ops/sec ±1.29% (92 runs sampled)
79+
Immer - No Freeze x 5.26 ops/sec ±0.56% (18 runs sampled)
8080
81-
Mutative - Freeze x974 ops/sec ±1.77% (92 runs sampled)
82-
Immer - Freeze x376 ops/sec ±0.67% (92 runs sampled)
81+
Mutative - Freeze x950 ops/sec ±0.95% (96 runs sampled)
82+
Immer - Freeze x377 ops/sec ±0.37% (93 runs sampled)
8383
84-
Mutative - Patches and No Freeze x969 ops/sec ±0.99% (97 runs sampled)
85-
Immer - Patches and No Freeze x 5.27 ops/sec ±0.36% (18 runs sampled)
84+
Mutative - Patches and No Freeze x978 ops/sec ±0.16% (97 runs sampled)
85+
Immer - Patches and No Freeze x 5.23 ops/sec ±0.25% (18 runs sampled)
8686
87-
Mutative - Patches and Freeze x514 ops/sec ±0.97% (95 runs sampled)
88-
Immer - Patches and Freeze x275 ops/sec ±0.74% (89 runs sampled)
87+
Mutative - Patches and Freeze x504 ops/sec ±1.01% (94 runs sampled)
88+
Immer - Patches and Freeze x272 ops/sec ±0.83% (89 runs sampled)
8989
9090
The fastest method is Mutative - No Freeze
9191
```
@@ -96,7 +96,7 @@ Run `yarn benchmark` to measure performance.
9696
9797
Immer relies on auto-freeze to be enabled, if auto-freeze is disabled, Immer will have a huge performance drop and Mutative will have a huge performance lead, especially with large data structures it will have a performance lead of more than 50x.
9898

99-
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,199 ops/sec`) and Immer (`376 ops/sec`).
99+
So if you are using Immer, you will have to enable auto-freeze for performance. Mutative is disabled auto-freeze by default. With the default configuration of both, we can see the 16x performance gap between Mutative (`6,246 ops/sec`) and Immer (`377 ops/sec`).
100100

101101
Overall, Mutative has a huge performance lead over Immer in[more performance testing scenarios](https://github.com/unadlib/mutative/tree/main/test/performance). Run`yarn performance` to get all the performance results locally.
102102

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp