2021-10 Py: switch to using collections.deque
By switching the lists I was using as stacks out with a deque, I appear to have achieved a teeeensy speed improvement. List `append()` and `pop()` methods have at most a O(n) time complexity, where deques have a O(1) time complexity. https://docs.python.org/3/library/collections.html#collections.deque Signed-off-by: AKU <tom@tdpain.net>
This commit is contained in:
parent
c55c9839e2
commit
a60facbf55
3 changed files with 9 additions and 8 deletions
Binary file not shown.
Before Width: | Height: | Size: 54 KiB After Width: | Height: | Size: 53 KiB |
Loading…
Add table
Add a link
Reference in a new issue