BlogDocs

test: add reactivity benchmark(#9638)

Merged
Merging
sxzz:benchmark
into
main
N/A
IMPROVEMENTS
0
REGRESSIONS
0
UNTOUCHED
0
NEW
53
DROPPED
0
IGNORED
0

Benchmarks

1000 refs, 1 computed
packages/reactivity/__tests__/computed.bench.ts::computed::1000 refs, 1 computed
N/A
N/A
14.7 ms
create computed
packages/reactivity/__tests__/computed.bench.ts::computed::create computed
N/A
N/A
37.8 µs
write independent ref dep
packages/reactivity/__tests__/computed.bench.ts::computed::write independent ref dep
N/A
N/A
55.3 µs
write ref, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read 1000 computeds (invoked)
N/A
N/A
3.4 ms
write ref, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read 1000 computeds (never invoked)
N/A
N/A
62.4 µs
write ref, don't read computed (invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read computed (invoked)
N/A
N/A
123.1 µs
write ref, don't read computed (never invoked)
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, don't read computed (never invoked)
N/A
N/A
55.1 µs
write ref, read 1000 computeds
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, read 1000 computeds
N/A
N/A
29.7 ms
write ref, read computed
packages/reactivity/__tests__/computed.bench.ts::computed::write ref, read computed
N/A
N/A
286.2 µs
reduce *raw* array, copied, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 10 elements
N/A
N/A
379.8 µs
reduce *raw* array, copied, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 100 elements
N/A
N/A
247.8 µs
reduce *raw* array, copied, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, copied, 1000 elements
N/A
N/A
952.6 µs
reduce *raw* array, manually triggered, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 10 elements
N/A
N/A
1.1 ms
reduce *raw* array, manually triggered, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 100 elements
N/A
N/A
288.6 µs
reduce *raw* array, manually triggered, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *raw* array, manually triggered, 1000 elements
N/A
N/A
1.1 ms
reduce *reactive* array, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 10 elements
N/A
N/A
3.5 ms
reduce *reactive* array, 10 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 10 elements, only change first value
N/A
N/A
657 µs
reduce *reactive* array, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 100 elements
N/A
N/A
11.9 ms
reduce *reactive* array, 100 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 100 elements, only change first value
N/A
N/A
3.8 ms
reduce *reactive* array, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 1000 elements
N/A
N/A
123.1 ms
reduce *reactive* array, 1000 elements, only change first value
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *reactive* array, 1000 elements, only change first value
N/A
N/A
35.4 ms
reduce *readonly* array, 10 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 10 elements
N/A
N/A
1.8 ms
reduce *readonly* array, 100 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 100 elements
N/A
N/A
6.7 ms
reduce *readonly* array, 1000 elements
packages/reactivity/__tests__/reactiveArray.bench.ts::reduce *readonly* array, 1000 elements
N/A
N/A
64 ms
1000 reactive maps, 1 computed
packages/reactivity/__tests__/reactiveMap.bench.ts::1000 reactive maps, 1 computed
N/A
N/A
31.7 ms
create reactive map
packages/reactivity/__tests__/reactiveMap.bench.ts::create reactive map
N/A
N/A
57.5 µs
write reactive map (10'000 items), read computed
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map (10'000 items), read computed
N/A
N/A
40.4 ms
write reactive map property
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map property
N/A
N/A
85.9 µs
write reactive map, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read 1000 computeds (invoked)
N/A
N/A
4.9 ms
write reactive map, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read 1000 computeds (never invoked)
N/A
N/A
76.5 µs
write reactive map, don't read computed (invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read computed (invoked)
N/A
N/A
178.3 µs
write reactive map, don't read computed (never invoked)
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, don't read computed (never invoked)
N/A
N/A
62.1 µs
write reactive map, read 1000 computeds
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, read 1000 computeds
N/A
N/A
48.6 ms
write reactive map, read computed
packages/reactivity/__tests__/reactiveMap.bench.ts::write reactive map, read computed
N/A
N/A
302.8 µs
1000 reactive objs, 1 computed
packages/reactivity/__tests__/reactiveObject.bench.ts::1000 reactive objs, 1 computed
N/A
N/A
24.1 ms
create reactive obj
packages/reactivity/__tests__/reactiveObject.bench.ts::create reactive obj
N/A
N/A
50 µs
write reactive obj property
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj property
N/A
N/A
93.7 µs
write reactive obj, don't read 1000 computeds (invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read 1000 computeds (invoked)
N/A
N/A
3.5 ms
write reactive obj, don't read 1000 computeds (never invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read 1000 computeds (never invoked)
N/A
N/A
123.7 µs
write reactive obj, don't read computed (invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read computed (invoked)
N/A
N/A
190.4 µs
write reactive obj, don't read computed (never invoked)
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, don't read computed (never invoked)
N/A
N/A
93.4 µs
write reactive obj, read 1000 computeds
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, read 1000 computeds
N/A
N/A
39.5 ms
write reactive obj, read computed
packages/reactivity/__tests__/reactiveObject.bench.ts::write reactive obj, read computed
N/A
N/A
298.6 µs
create ref
packages/reactivity/__tests__/ref.bench.ts::ref::create ref
N/A
N/A
41.4 µs
read ref
packages/reactivity/__tests__/ref.bench.ts::ref::read ref
N/A
N/A
22 µs
write ref
packages/reactivity/__tests__/ref.bench.ts::ref::write ref
N/A
N/A
88 µs
write/read ref
packages/reactivity/__tests__/ref.bench.ts::ref::write/read ref
N/A
N/A
89.5 µs
create watchEffect
packages/runtime-core/__tests__/apiWatch.bench.ts::create watchEffect
N/A
N/A
107.1 µs
create watcher
packages/runtime-core/__tests__/apiWatch.bench.ts::create watcher
N/A
N/A
231.5 µs
update ref to trigger watchEffect (executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watchEffect (executed)
N/A
N/A
232.8 µs
update ref to trigger watchEffect (scheduled but not executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watchEffect (scheduled but not executed)
N/A
N/A
1.2 ms
update ref to trigger watcher (executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watcher (executed)
N/A
N/A
1.6 ms
update ref to trigger watcher (scheduled but not executed)
packages/runtime-core/__tests__/apiWatch.bench.ts::update ref to trigger watcher (scheduled but not executed)
N/A
N/A
296.9 µs

Commits

Click on a commit to change the comparison range
No baseline data is yet availableOnce your main branch has generated a first performance report, you will see the list of commits and their performance impact here.
ResourcesHomePricingDocsBlogGitHub
Copyright © 2024 CodSpeed Technology SAS. All rights reserved.