1. 19 Jul, 2002 3 commits
    • Tim Peters's avatar
      Cleanup yielding a small speed boost: before rich comparisons were · 827dbf58
      Tim Peters authored
      introduced, list.sort() was rewritten to use only the "< or not <?"
      distinction.  After rich comparisons were introduced, docompare() was
      fiddled to translate a Py_LT Boolean result into the old "-1 for <,
      0 for ==, 1 for >" flavor of outcome, and the sorting code was left
      alone.  This left things more obscure than they should be, and turns
      out it also cost measurable cycles.
      
      So:  The old CMPERROR novelty is gone.  docompare() is renamed to islt(),
      and now has the same return conditinos as PyObject_RichCompareBool.  The
      SETK macro is renamed to ISLT, and is even weirder than before (don't
      complain unless you want to maintain the sort code <wink>).
      
      Overall, this yields a 1-2% speedup in the usual (no explicit function
      passed to list.sort()) case when sorting arrays of floats (as sortperf.py
      does).  The boost is higher for arrays of ints.
      827dbf58
    • Tim Peters's avatar
      Trimmed trailing whitespace. · 1db1e3f4
      Tim Peters authored
      1db1e3f4
    • Tim Peters's avatar
      Cleanup: Define one internal utility for reversing a list slice, and · 86386a5d
      Tim Peters authored
      use that everywhere.
      86386a5d
  2. 18 Jul, 2002 19 commits
  3. 17 Jul, 2002 18 commits