Rainbench is designed to test the throughput of different reactive libraries. It's a simple benchmark that fills a bucket with raindrops.
Each rain drop creates a subcription and the observable gets updated every millisecond, which should trigger a rebuild of each rain drop widget with its new position.
The number of raindrops and the capacity of the bucket can be adjusted. The benchmark will run until the bucket is full. The time it takes to fill the bucket is recorded and displayed at the end of the benchmark.
- Release mode on linux
- Benchmark is restarted after each run to prevent GC interference
- value_LB == value_listenable_builder
stream_builder
andvalue_LB
are not perfect comparisons as they can only listen to 1 observable at a time... but they serve as a good baseline
Library | Raindrops/s | Time to fill bucket |
---|---|---|
state_beacon | 6112 | 4.91s |
value_LB | 5301 | 5.66s |
mobx | 4463 | 6.72s |
signals | 1868 | 16.06s |
stream_builder | 1597 | 18.78s |
context_watch | 1245 | 24.01s |
solidart | DNF | DNF |