We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f188ce commit f8b479dCopy full SHA for f8b479d
src/computed.js
@@ -101,5 +101,23 @@ function go() {
101
});
102
103
104
+ bench(() => {
105
+ const refs = [];
106
+ for (let i = 0, n = 1000; i < n; i++) {
107
+ refs.push(ref(i));
108
+ }
109
+ const c = computed(() => {
110
+ let total = 0;
111
+ refs.forEach(ref => total += ref.value);
112
+ return total;
113
+ });
114
+ let i = 0;
115
+ const n = refs.length;
116
+ return suite.add("1000 refs, 1 computed", () => {
117
+ refs[i++ % n].value++;
118
+ const v = c.value;
119
120
121
+
122
return suite;
123
}
0 commit comments