tapa
tapa copied to clipboard
Reordering coroutine schedule to optimize for graph dependency
When a lot of small tasks presents, in the worst case, coroutine schedule can be in a reverse topological ordering. In this situation, in each round of scheduling, only one task is being executed, which degrades performance. A proposed solution is to analyze the dependency graph with topological sorting and modify the schedule.