1. 04 Aug, 2002 14 commits
    • Tim Peters's avatar
      Sped the usual case for sorting by calling PyObject_RichCompareBool · ed842dde
      Tim Peters authored
      directly when no comparison function is specified.  This saves a layer
      of function call on every compare then.  Measured speedups:
      
       i    2**i  *sort  \sort  /sort  3sort  +sort  %sort  ~sort  =sort  !sort
      15   32768  12.5%   0.0%   0.0% 100.0%   0.0%  50.0% 100.0% 100.0% -50.0%
      16   65536   8.7%   0.0%   0.0%   0.0%   0.0%   0.0%  12.5%   0.0%   0.0%
      17  131072   8.0%  25.0%   0.0%  25.0%   0.0%  14.3%   5.9%   0.0%   0.0%
      18  262144   6.3% -10.0%  12.5%  11.1%   0.0%   6.3%   5.6%  12.5%   0.0%
      19  524288   5.3%   5.9%   0.0%   5.6%   0.0%   5.9%   5.4%   0.0%   2.9%
      20 1048576   5.3%   2.9%   2.9%   5.1%   2.8%   1.3%   5.9%   2.9%   4.2%
      
      The best indicators are those that take significant time (larger i), and
      where sort doesn't do very few compares (so *sort and ~sort benefit most
      reliably).  The large numbers are due to roundoff noise combined with
      platform variability; e.g., the 14.3% speedup for %sort at i=17 reflects
      a printed elapsed time of 0.18 seconds falling to 0.17, but a change in
      the last digit isn't really meaningful (indeed, if it really took 0.175
      seconds, one electron having a lazy nanosecond could shift it to either
      value <wink>).  Similarly the 25% at 3sort i=17 was a meaningless change
      from 0.05 to 0.04.  However, almost all the "meaningless changes" were
      in the same direction, which is good.  The before-and-after times for
      *sort are clearest:
      
      before after
        0.18  0.16
        0.25  0.23
        0.54  0.50
        1.18  1.11
        2.57  2.44
        5.58  5.30
      ed842dde
    • Martin v. Löwis's avatar
      54c5596d
    • Martin v. Löwis's avatar
      Add encoding declaration. · 9208b09d
      Martin v. Löwis authored
      9208b09d
    • Martin v. Löwis's avatar
      Add encoding declaration. · 6fd0f4ab
      Martin v. Löwis authored
      6fd0f4ab
    • Steve Holden's avatar
    • Martin v. Löwis's avatar
      bffc9b83
    • Martin v. Löwis's avatar
      712e7ceb
    • Martin v. Löwis's avatar
      Add recursion counter for pickling. Fixes #576084. · e702f980
      Martin v. Löwis authored
      2.2 bugfix candidate (may cause RuntimeError for applications that
      currently work fine).
      e702f980
    • Andrew MacIntyre's avatar
      OS/2 EMX now supported · 7fe6e33d
      Andrew MacIntyre authored
      7fe6e33d
    • Tim Peters's avatar
      I don't know what's going on with this test, but the last change from · 3f7ceaec
      Tim Peters authored
      Piers obviously couldn't have passed on any platform.  Fiddling it so it
      works (for a meaning of "works" no stronger than "doesn't fail" <wink>).
      3f7ceaec
    • Andrew MacIntyre's avatar
      SF patch #578297: · fc8f5a6f
      Andrew MacIntyre authored
      Change the parser and compiler to use PyMalloc.
      
      Only the files implementing processes that will request memory
      allocations small enough for PyMalloc to be a win have been
      changed, which are:-
       - Python/compile.c
       - Parser/acceler.c
       - Parser/node.c
       - Parser/parsetok.c
      
      This augments the aggressive overallocation strategy implemented by
      Tim Peters in PyNode_AddChild() [Parser/node.c], in reducing the
      impact of platform malloc()/realloc()/free() corner case behaviour.
      Such corner cases are known to be triggered by test_longexp and
      test_import.
      
      Jeremy Hylton, in accepting this patch, recommended this as a
      bugfix candidate for 2.2.  While the changes to Python/compile.c
      and Parser/node.c backport easily (and could go in), the changes
      to Parser/acceler.c and Parser/parsetok.c require other not
      insignificant changes as a result of the differences in the memory
      APIs between 2.3 and 2.2, which I'm not in a position to work
      through at the moment.  This is a pity, as the Parser/parsetok.c
      changes are the most important after the Parser/node.c changes, due
      to the size of the memory requests involved and their frequency.
      fc8f5a6f
    • Andrew MacIntyre's avatar
      - comment improvement · 21c36546
      Andrew MacIntyre authored
      - implement viable library search routine for EMX
      21c36546
    • Andrew MacIntyre's avatar
    • Andrew M. Kuchling's avatar
      Add two reminders · 84939714
      Andrew M. Kuchling authored
      84939714
  2. 03 Aug, 2002 13 commits
  3. 02 Aug, 2002 13 commits