code: def _str_to_int_inner(s):
      """Asymptotically fast conversion of a 'str' to an 'int'."""
  
      # Function due to Bjorn Martinsson.  See GH issue #90716 for details.
      # https://github.com/python/cpython/issues/90716
      #
      # The implementation in longobject.c of base conversion algorithms
      # between power-of-2 and non-power-of-2 bases are quadratic time.
      # This function implements a divide-and-conquer algorithm making use
      # of Python's built in big int multiplication. Since Python uses the
      # Karatsuba algorithm for multiplication, the time complexity
      # of this function is O(len(s)**1.58).
  
      DIGLIM = 2048
  
      mem = {}
  
      def w5pow(w):
          """Return 5**w and store the result.
          Also possibly save some intermediate results. In context, these
          are likely to be reused across various levels of the conversion
          to 'int'.
          """
          if (result := mem.get(w)) is None:
              if w <= DIGLIM:
                  result = 5**w
              elif w - 1 in mem:
                  result = mem[w - 1] * 5
              else:
                  w2 = w >> 1
                  # If w happens to be odd, w-w2 is one larger then w2
                  # now. Recurse on the smaller first (w2), so that it's
                  # in the cache and the larger (w-w2) can be handled by
                  # the cheaper `w-1 in mem` branch instead.
                  result = w5pow(w2) * w5pow(w - w2)
              mem[w] = result
          return result
  
      def inner(a, b):
          if b - a <= DIGLIM:
              return int(s[a:b])
          mid = (a + b + 1) >> 1
          return inner(mid, b) + (
              (inner(a, mid) * w5pow(b - mid)) << (b - mid)
          )
  
      return inner(0, len(s))
  
file_path: cpython/Lib/_pylong.py
imports: import re
  import decimal
label_desc: Use image node_id 3 for calling a global function with example usage: _str_to_int_inner(s) and returns: inner, result, unknown, int