Message334100
I have updated the PR to receive a dictionary of sets as in Eric V. Smith's package. I have maintained the guts of the current algorithm as it scales much better:
>>> test_data = {x:{x+n for n in range(100)} for x in range(1000)}
>>> %timeit list(toposort.toposort(test_data)) # The one in PyPi
910 ms ± 2.1 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
>>> %timeit list(functools.toposort(test_data)) # In this PR
69.3 ms ± 280 µs per loop (mean ± std. dev. of 7 runs, 10 loops each)
>>> list(functools.toposort(l)) == list(toposort.toposort(l))
True |
|
| Date |
User |
Action |
Args |
| 2019-01-20 20:42:40 | pablogsal | set | recipients:
+ pablogsal, rhettinger, terry.reedy, belopolsky, eric.smith, christian.heimes, tshepang, [email protected], martin.panter, remi.lapeyre |
| 2019-01-20 20:42:38 | pablogsal | set | messageid: <[email protected]> |
| 2019-01-20 20:42:38 | pablogsal | link | issue17005 messages |
| 2019-01-20 20:42:38 | pablogsal | create | |
|