Skip to content

Benchmarks

Nicolás Seijas edited this page Aug 3, 2026 · 3 revisions

Benchmarks

Rambla does not make a setter more quick. Rambla decreases the number of notifications when the load is continuous. The full method and the instructions to do the measurements again are in BENCHMARKS.md.

Warning: all the values on this page are indicative. The conditions were ShortRun, one development machine and .NET 10. Do the measurements again before you use these values.

The primary result

100,000 mutations give approximately 101 notifications. This is a decrease of approximately 99.9 percent.

This decrease is a property of the model. It does not change with the cost of a notification. The decrease in time is different for each application, because it is a function of the cost of one notification.

The notifications under load

The test writes 100,000 times to one property. The subscriber does the work that one notification usually causes, such as a binding update, a layout operation and a render operation.

Subscriber Usual mean Usual memory Rambla mean Rambla memory Ratio
No work 599 µs 2,344 KB 1,010 µs 12 KB 1.68 (the usual method is better)
CPU work 7,627 µs 2,344 KB 1,013 µs 12 KB 0.13
UI work 11,041 µs 21,871 KB 1,026 µs 32 KB 0.09
  • If the subscriber does no work, the usual method is better. Rambla prevents no subsequent work, thus only its own cost stays.
  • If the subscriber does the usual UI work, Rambla is approximately 11 times more quick. It also uses approximately 680 times less memory. Rambla raises 101 notifications, not 100,000.

The equal-cost point

The two methods have an equal cost when one notification causes approximately 30 ns of subsequent work.

A binding update in WPF costs much more than 30 ns. Thus an application with a UI is on the side where Rambla is better.

The conditions in which Rambla is not better

The advantage of Rambla is a function of the number of different properties in one flush. The test writes 100,000 times.

Different properties Coalescing Result
1 99.9 % Rambla is much better.
100 90.0 % Rambla is better.
1,000 or more 0.0 % Rambla is only additional cost.

When the number of different properties in one flush is near the number of writes, Rambla removes no notification. Refer to Philosophy.

The sample application

The market dashboard sample measures the time between the write operation of the producer and the moment when the value is visible. It gives the values p50, p95 and p99. Change the refresh rate to find the best value for your application. The usual value is 60 flushes in one second.

Clone this wiki locally