Closed czan closed 5 years ago
Fixing this takes parsing from quadratic to linear time.
This performance problem means that it takes some of our (very large) files over half an hour to be loaded in Python, against less than half a minute in Clojure.
Wow! Thanks for looking into this @czan :)
@bfontaine Can you please review? Thanks!
Great idea! I added two remarks regarding avoidable calls to list(…)
but otherwise :+1:
Previously a list was used to hold the intermediate results during parsing of "expressions", but each expression was prepended by copying, Fixing this takes parsing from quadratic to linear time.
This performance problem means that it takes some of our (very large) files over half an hour to be loaded in Python, against less than half a minute in Clojure.