Benchmark App

For benchmarking, a simple graph network was replicated with the three libraries.

Each version was implemented in a separated ES6 module. For every input impulse, the network generates a list of to-do items. Every item has a copy of an old item (the old item is updated with every four elements).

The network is very simple but uses some of the principal operators of the three libs.

Another peculiarity of the network is the presence of a “diamond”. Diamond flows are not recommended and can cause glitches in the execution. In the demo, the diamond was voluntarily introduced to compare how the three libs react.

In short, Most, with its explicit time representation and the async startup was the most intuitive and glitch-resistant. For the other two libs, it was necessary to force an async behavior, adding a setTimeout to have the diamond network work as expected.

Let’s see the core of the three versions plus an imperative traditional version:

Imperative traditional version

RxJS version

@most/core version