[issue44300] using Linked list vs dynamic array for LifoQueue class

2021-06-03 Thread Raymond Hettinger
Raymond Hettinger added the comment: Lists appends and pops are already amortized O(1) operations. As they grow, they over-allocate by 12.5%. When shrinking they reclaim memory when the size falls in half. Together, these two strategies make lists efficient as a LIFO stack. A straight li

[issue44300] using Linked list vs dynamic array for LifoQueue class

2021-06-03 Thread Mihai Ion
New submission from Mihai Ion : Switching to Linked list data structure for improving performance append() and pop() run time complexity when eliminating dynamic array resizing -- components: Library (Lib) files: main.py messages: 395004 nosy: euromike21 priority: normal severity: norm