vitaly-t / iter-ops

Basic operations on iterables
https://vitaly-t.github.io/iter-ops
MIT License
136 stars 5 forks source link

Operator waitRace should deactivate when cacheSize < 2 #186

Closed vitaly-t closed 1 year ago

vitaly-t commented 1 year ago

At the moment, operator waitRace applies generic processing logic when cacheSize is < 2.

It should instead check if cacheSize < 2, and then deactivate fully, i.e. behave like operator wait.

This is because there is no point applying all the complex processing logic to something that won't be able to change the output anyway, because the cache size of 1 does not permit any resolution racing.

This is just a performance optimization 🚀


This is some improvement, following #182

vitaly-t commented 1 year ago

Released in v2.2.3