Not meaning to throw shade on Wisper 2.0.0; it's a very mature, reliable, widely-used Pub/Sub system. It's not the fastest, though; benchmarking it against against RocketMan 0.1.1 and dry-events 0.2.0 gives the following results:
Results:
$ ./benchmarks.rb
Rehearsal -------------------------------------------------
RocketMan 0.150000 0.010000 0.160000 ( 0.163206)
Wisper 2.330000 0.350000 2.680000 ( 2.994349)
Dry::Events 1 1.490000 0.290000 1.780000 ( 1.788510)
Dry::Events 2 1.600000 0.250000 1.850000 ( 1.847081)
---------------------------------------- total: 6.470000sec
user system total real
RocketMan 0.160000 0.000000 0.160000 ( 0.159497)
Wisper 2.300000 0.410000 2.710000 ( 2.759654)
Dry::Events 1 1.400000 0.330000 1.730000 ( 1.733275)
Dry::Events 2 1.440000 0.320000 1.760000 ( 1.758974)
$ ./benchmarks.rb
Rehearsal -------------------------------------------------
RocketMan 0.140000 0.010000 0.150000 ( 0.157267)
Wisper 2.380000 0.300000 2.680000 ( 3.046776)
Dry::Events 1 1.510000 0.290000 1.800000 ( 1.804191)
Dry::Events 2 1.400000 0.330000 1.730000 ( 1.743957)
---------------------------------------- total: 6.360000sec
user system total real
RocketMan 0.170000 0.010000 0.180000 ( 0.174773)
Wisper 2.300000 0.330000 2.630000 ( 2.677181)
Dry::Events 1 1.440000 0.280000 1.720000 ( 1.731817)
Dry::Events 2 1.490000 0.330000 1.820000 ( 1.827146)
$
Notes:
- This adds two benchmarks for dry-events 0.2.0, which was not previously included in the benchmarks; see notes below for details
- The ridiculously-high times for the Wisper benchmark previously published are no longer reproducible;
The benchmark labelled Dry::Events 1
uses event listeners, whereas Dry::Events 2
uses block-based subscribers. The two techniques are closely matched in speed relative to each other.
The code used to provide these benchmarks is below. Feel free to suggest improvements.