Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[IMP] reactivity: replace sets with small arrays for performance
While Sets have better lookup complexity than arrays, because of the large constant factors, small arrays can perform better than small sets when checking for inclusion. In practice, replacing both of the raw types sets with arrays can improve performance of reactive-heavy workloads by as much as 30%. Considering the reactivity code is very hot when rendering data-heavy components, and the low impact on readability of the fix, the cost-benefit analysis is clearly in favour of making the fix.
- Loading branch information