montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Optimization to removes a slice and avoid calculating handler selectors ... #84

Closed marchant closed 9 years ago

marchant commented 10 years ago

...if there is no listener

francoisfrisch commented 10 years ago

If you run the tests added by #85 you will see that there are a few edge cases missing in this implementation.

kriskowal commented 10 years ago

Subsumed by #86, except for using the while loop trick, which I expect to interfere with FRB tests because it reverses the order of propagation. May be possible to use while countdown loop instead of for countup loop if the change listeners are augmented with unshift instead of push, but with the penalty of bubbling. I don’t expect to see meaningful changes to average propagation speed either way since this is typically a very small array.

marchant commented 9 years ago

Closing