You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Refactor `task_groups` & `task_prefixes`
Moves `task_groups` and `task_prefixes` to `SchedulerState` where they
are type annotated. Then uses them through `parent` within `Scheduler`.
Allows Cython to recognize these are Python `dict`s and optimize calls
and operations on them.
* Use `.get(...)` instead of `try...except...`
Instead of using `try...except...` to catch and handle `KeyError`s, just
use `.get(...), which gets the key needed or returns `None`. This has
less overhead. Also the following `None` check is a quick pointer
comparison. Otherwise the code is unchanged.
* Assign `TaskGroup` before `if`
Since it is used in the check as well, go ahead and assign it beforehand
for simplicity.
0 commit comments