-
Notifications
You must be signed in to change notification settings - Fork 19
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
perf(array): improve array method perf #75
base: main
Are you sure you want to change the base?
Conversation
Coverage after merging perf/array into main will be
Coverage Report
|
Before:
After:
Beforce:
After:
From the comparison of the two benchmark tests above, we can see that Mutative’s deletion operation performance has improved by I will continue adding more test sets to ensure the correctness of immutable updates. |
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
This PR focuses solely on performance optimization for Array operations such as However, the optimization makes the draft getters more complex, so we are carefully considering whether to merge this PR into the main branch. |
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
Coverage after merging perf/array into main will be
Coverage Report
|
We noticed in the Redux community’s benchmarks involving Mutative that the results for remove-related operations were not very satisfactory. reduxjs/redux-toolkit#4793
After analyzing Mutative, we found that whenever an array uses native methods to mutate its contents, the proxy mechanism unnecessarily instantiates a draft for each potentially accessed item. This unnecessary instantiation is the main cause of the poor performance. This PR addresses that issue.