• Raymond Hettinger's avatar
    Optimize slice assignments. · dd8d4870
    Raymond Hettinger authored
    * Replace sprintf message with a constant message string -- this error
      message ran on every invocation except straight deletions but it was
      only needed when the rhs was not iterable.  The message was also
      out-of-date and did not reflect that iterable arguments were allowed.
    
    * For inner loops that do not make ref count adjustments, use memmove()
      for fast copying and better readability.
    
    * For inner loops that do make ref count adjustments, speed them up by
      factoring out the constant structure reference and using vitem[] instead.
    dd8d4870
listobject.c 65.3 KB