@@ -174,9 +174,12 @@ export async function sbench_create_0to1() {
174
174
}
175
175
176
176
const { timing } = await fastest_test ( 10 , ( ) => {
177
- for ( let i = 0 ; i < 100 ; i ++ ) {
178
- bench ( create_computations_0to1 , COUNT , 0 ) ;
179
- }
177
+ const destroy = $ . effect_root ( ( ) => {
178
+ for ( let i = 0 ; i < 10 ; i ++ ) {
179
+ bench ( create_computations_0to1 , COUNT , 0 ) ;
180
+ }
181
+ } ) ;
182
+ destroy ( ) ;
180
183
} ) ;
181
184
182
185
return {
@@ -193,9 +196,12 @@ export async function sbench_create_1to1() {
193
196
}
194
197
195
198
const { timing } = await fastest_test ( 10 , ( ) => {
196
- for ( let i = 0 ; i < 100 ; i ++ ) {
197
- bench ( create_computations_1to1 , COUNT , COUNT ) ;
198
- }
199
+ const destroy = $ . effect_root ( ( ) => {
200
+ for ( let i = 0 ; i < 10 ; i ++ ) {
201
+ bench ( create_computations_1to1 , COUNT , COUNT ) ;
202
+ }
203
+ } ) ;
204
+ destroy ( ) ;
199
205
} ) ;
200
206
201
207
return {
@@ -212,9 +218,12 @@ export async function sbench_create_2to1() {
212
218
}
213
219
214
220
const { timing } = await fastest_test ( 10 , ( ) => {
215
- for ( let i = 0 ; i < 100 ; i ++ ) {
216
- bench ( create_computations_2to1 , COUNT / 2 , COUNT ) ;
217
- }
221
+ const destroy = $ . effect_root ( ( ) => {
222
+ for ( let i = 0 ; i < 10 ; i ++ ) {
223
+ bench ( create_computations_2to1 , COUNT / 2 , COUNT ) ;
224
+ }
225
+ } ) ;
226
+ destroy ( ) ;
218
227
} ) ;
219
228
220
229
return {
@@ -231,9 +240,12 @@ export async function sbench_create_4to1() {
231
240
}
232
241
233
242
const { timing } = await fastest_test ( 10 , ( ) => {
234
- for ( let i = 0 ; i < 100 ; i ++ ) {
235
- bench ( create_computations_4to1 , COUNT / 4 , COUNT ) ;
236
- }
243
+ const destroy = $ . effect_root ( ( ) => {
244
+ for ( let i = 0 ; i < 10 ; i ++ ) {
245
+ bench ( create_computations_4to1 , COUNT / 4 , COUNT ) ;
246
+ }
247
+ } ) ;
248
+ destroy ( ) ;
237
249
} ) ;
238
250
239
251
return {
@@ -250,9 +262,12 @@ export async function sbench_create_1000to1() {
250
262
}
251
263
252
264
const { timing } = await fastest_test ( 10 , ( ) => {
253
- for ( let i = 0 ; i < 100 ; i ++ ) {
254
- bench ( create_computations_1000to1 , COUNT / 1000 , COUNT ) ;
255
- }
265
+ const destroy = $ . effect_root ( ( ) => {
266
+ for ( let i = 0 ; i < 10 ; i ++ ) {
267
+ bench ( create_computations_1000to1 , COUNT / 1000 , COUNT ) ;
268
+ }
269
+ } ) ;
270
+ destroy ( ) ;
256
271
} ) ;
257
272
258
273
return {
@@ -269,9 +284,12 @@ export async function sbench_create_1to2() {
269
284
}
270
285
271
286
const { timing } = await fastest_test ( 10 , ( ) => {
272
- for ( let i = 0 ; i < 100 ; i ++ ) {
273
- bench ( create_computations_1to2 , COUNT , COUNT / 2 ) ;
274
- }
287
+ const destroy = $ . effect_root ( ( ) => {
288
+ for ( let i = 0 ; i < 10 ; i ++ ) {
289
+ bench ( create_computations_1to2 , COUNT , COUNT / 2 ) ;
290
+ }
291
+ } ) ;
292
+ destroy ( ) ;
275
293
} ) ;
276
294
277
295
return {
@@ -288,9 +306,12 @@ export async function sbench_create_1to4() {
288
306
}
289
307
290
308
const { timing } = await fastest_test ( 10 , ( ) => {
291
- for ( let i = 0 ; i < 100 ; i ++ ) {
292
- bench ( create_computations_1to4 , COUNT , COUNT / 4 ) ;
293
- }
309
+ const destroy = $ . effect_root ( ( ) => {
310
+ for ( let i = 0 ; i < 10 ; i ++ ) {
311
+ bench ( create_computations_1to4 , COUNT , COUNT / 4 ) ;
312
+ }
313
+ } ) ;
314
+ destroy ( ) ;
294
315
} ) ;
295
316
296
317
return {
@@ -307,9 +328,12 @@ export async function sbench_create_1to8() {
307
328
}
308
329
309
330
const { timing } = await fastest_test ( 10 , ( ) => {
310
- for ( let i = 0 ; i < 100 ; i ++ ) {
311
- bench ( create_computations_1to8 , COUNT , COUNT / 8 ) ;
312
- }
331
+ const destroy = $ . effect_root ( ( ) => {
332
+ for ( let i = 0 ; i < 10 ; i ++ ) {
333
+ bench ( create_computations_1to8 , COUNT , COUNT / 8 ) ;
334
+ }
335
+ } ) ;
336
+ destroy ( ) ;
313
337
} ) ;
314
338
315
339
return {
@@ -326,9 +350,12 @@ export async function sbench_create_1to1000() {
326
350
}
327
351
328
352
const { timing } = await fastest_test ( 10 , ( ) => {
329
- for ( let i = 0 ; i < 100 ; i ++ ) {
330
- bench ( create_computations_1to1000 , COUNT , COUNT / 1000 ) ;
331
- }
353
+ const destroy = $ . effect_root ( ( ) => {
354
+ for ( let i = 0 ; i < 10 ; i ++ ) {
355
+ bench ( create_computations_1to1000 , COUNT , COUNT / 1000 ) ;
356
+ }
357
+ } ) ;
358
+ destroy ( ) ;
332
359
} ) ;
333
360
334
361
return {
0 commit comments