millermedeiros/js-signals — Issue #42: use a linked list to store bindings and check perf
Author: millermedeiros
Created: 2012-02-27 15:30:32+00:00
State: open
Labels: enhancement, question

That is something I've been considering ever since v0.1, LinkedLists are usually faster in some types of operations because of the way they are constructed (no need to move all the items of the list to insert one in the middle). I didn't implemented it yet because **it only makes sense if the amount of listeners to a single event is HUGE** and that usually isn't the case (specially since each Signal is an individual event type), on all the times I used Signals on the past 1yr 1/2 *(n)* was always small (under 100).

My current feeling is that the amount of code wouldn't pay-off the perf improvement on the edge case of having thousands of listeners to the same Signal, I'm also not sure how it would affect perf in a small *(n)* (regular scenario).

Maybe keep it as a branch so user can choose which version to use in his case.