2016-08-31 18:01 GMT+02:00 Henrik Johansen <henrik.s.johansen@veloxit.no>:

On 31 Aug 2016, at 10:10 , Glenn Cavarl�� <glenn.cavarle@gmail.com> wrote:

In Bloc the constraint is to propagate more than 2000 events/second without
to decrease fps

That's only a small part of the picture though, how many listeners are there per each event?
And how large do you think the overhead specific to delivery guards is compared to the constraint propagation handlers?

On my machine (an old 2011 MBP), the following gives��throughput��on the order of 300k-600k deliveries per second (very variable, due to the amount of garbage generated from copying subs, I presume)

So close to 3 times the performance of entry-level celeron for laptops today (if I take the lowest of the 15" MBP of early 2011).
��

#(1 10 100 1000) collect: [ :listeners |��

a := Announcer new.��
b := Object new.
"Single message send in handler"
listeners timesRepeat: [a when: Announcement do: [ :a | a yourself ] for: b.].
"announcement creation overhead not included"
ann := Announcement new.
[a announce: ann] bench].

Cheers,��
Henry

And with a registry tuned for delivery, yet maintaining the guards (attached)/exception/error handling properties, 900k -> 2.5M

#(1 10 100 1000) collect: [ :listeners |��

a := Announcer new.��
b := Object new.
a instVarNamed: 'registry' put: DeliveringSubscriptionRegistry new.��
"Single message send in handler"
listeners timesRepeat: [a when: Announcement do: [ :a | a yourself ] for: b.].
"announcement creation overhead not included"
ann := Announcement new.
[a announce: ann] bench.].

Thanks for the numbers. We need those to optimise what really matters :)

Thierry