HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by heavenlyblue | Hacker News Reader
Parent
Full thread
heavenlyblue
·
You should really use deque for the stack
View on HN
delaaxe
·
It's what I did in other parts of the project but I haven't noticed any performance increase. I guess standard lists are already fast enough for implementing stacks.
nivethan
·
Why?
comfydragon
·
Probably just an efficiency argument, since deque is designed to be efficient when used as a stack/queue.
https://docs.python.org/3.8/library/collections.html#collect...
Reply on news.ycombinator.com