erg-lang / erg

A statically typed language compatible with Python
http://erg-lang.org
Apache License 2.0
2.68k stars 55 forks source link

Change insert(0, elem) to push_front(elem) #348

Closed GreasySlug closed 1 year ago

GreasySlug commented 1 year ago

In parse.rs, self.restore(elem) use insert(0, elme) internally. This has an O(n) calc cost for each time this is used VecDeque has a push_front method, which is used