title: What is the time complexity(theta) of evaluating an expression using parser module in Python3?
body: <p>I want to know the algorithm or the time complexity that the parser module in Python3 uses in order to <code>eval</code> the expressions.</p>
  
  <p>This is my code:</p>
  
  <pre><code>import random
  import parser
  
  equation_ = '(x**3 + 5*(x**2) - 3*x + 3) + (4*(x**5) - 2*(x**2) + 1)'
  
  code = parser.expr(equation_).compile()
  test_cases = [random.randrange(-100, 100) for _ in range(10)]
  
  for x in test_cases:
      print(eval(code))
  
  </code></pre>
  
  <p>Now, I wanted to know which algorithm has been used or what is the time complexity of the method: <code>parser.expr()</code> and <code>eval()</code>.</p>
  
  <p>I tried reading the <a href="https://docs.python.org/3/library/parser.html#parser.expr" rel="nofollow noreferrer">documentation</a> but could not figure out, and so was the case with the <a href="https://github.com/python/cpython/blob/master/Parser/parser.c" rel="nofollow noreferrer">source code</a>: parser.c and parser.h</p>