cylc-flow
cylc-flow copied to clipboard
Speedup.replace uniq with list of iter uniq
list(iter_uniq(iterable))
# Is an order of magnitude faster than
uniq(iterable)
In both Python 3.8 and 3.13.
Full experiment posted in notebook in this comment.
[!NOTE] This will conflict with #6574 and will need to either be merged first or rebased.
Check List
- [x] I have read
CONTRIBUTING.mdand added my name as a Code Contributor. - [x] Contains logically grouped changes (else tidy your branch by rebase).
- [x] Does not contain off-topic changes (use other PRs for other changes).
- [x] Applied any dependency changes to both
setup.cfg(andconda-environment.ymlif present). - [x] This is a change of method, not interface:
- Existing tests cover change.
- Changelog not req'd
- Opened against master
- Docs not req'd