[Ecls-list] Optimization report

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Tue May 25 21:16:05 UTC 2010


Some things that have been added

* Better compiler macros for MAKE-ARRAY, AREF, ASET
* Speedup in compilation of LET/LET* forms, with more accurate constant
elimination and a little bit of type inference (really tiny bit)
* A new special form EXT:COMPILER-TYPECASE to generate different code paths
depending on the type of the argument.
* Application of that macro for optimizing DOTIMES
* LOOP can declare the type of its arguments when it knows the loop size.
* Better declarations in the pretty printer, leading to more efficient code
where safety is not a problem.
,,,
many I do not remember.

I attach below the evolution of CL-BENCH through from the last stable
release (ECLO, ECLOi), through the unstable sources of tonight (ECLx) and
some intermediate steps (ECL, ECLi). You will notice some dramatic changes,
for instance in the pretty printing code. However those changes are just due
to a few declarations. This emphasizes the fact that stupid, tiny fractions
of code can concentrate all the performance sinks of your code. Please
realize that the same is happening at other places. For instance ARRAY-1D is
not really testing the speed of arrays, but the that of assertions, and
similar problems elsewhere. They will have to be solved one by one.

* Benchmark                 Reference  ECLx   ECLi   ECLOi  ECLO   ECL
--------------------------------------------------------------------------
COMPILER                 [      1.02]   0.69   0.79   0.79   0.79   0.64
LOAD-FASL                [      0.16]   0.50   0.50   0.50   0.56   0.63
SUM-PERMUTATIONS         [      0.96]  -1.00  -1.00  -1.00  -1.00  -1.00
WALK-LIST/SEQ            [      0.01]   6.00  17.00  18.00   5.00   5.00
WALK-LIST/MESS           [      0.01]   5.00 119.00 110.00   5.00   5.00
BOYER                    [      2.06]   1.78   3.15   1.82   1.89   1.88
BROWSE                   [      0.17]   1.35   2.06   1.59   1.53   1.65
DDERIV                   [      0.11]   5.55   6.64   5.91   5.18   5.55
DERIV                    [      0.13]   5.15   5.38   5.31   5.38   5.31
DESTRUCTIVE              [      0.13]   3.08   3.15   3.00   3.00   3.00
DIV2-TEST-1              [      0.17]   5.65   6.35   5.94   5.71   5.76
DIV2-TEST-2              [      0.26]   3.96   5.23   4.27   3.81   4.42
FFT                      [      0.03]  13.33  15.67  16.33  17.67  13.67
FRPOLY/FIXNUM            [      0.16]   2.81   3.56   2.75   2.81   2.88
FRPOLY/BIGNUM            [      0.12]   1.92   2.42   2.00   2.08   1.92
FRPOLY/FLOAT             [      0.22]   2.36   2.95   2.50   2.50   2.55
PUZZLE                   [      0.15]   1.60   2.40  11.07  11.00   1.67
TAK                      [      0.12]   1.67   6.83   6.83   6.83   1.67
CTAK                     [      0.24]   2.46   3.50   3.63   3.75   2.63
TRTAK                    [      0.12]   1.67   6.83   6.75   6.83   1.58
TAKL                     [      0.26]   1.27   3.77   0.81   0.77   1.27
STAK                     [      0.31]   1.00   1.77   1.32   1.32   1.61
FPRINT/UGLY              [      0.55]   1.73   1.65   1.58   1.53   1.60
FPRINT/PRETTY            [      1.31]  17.50  25.89  26.23  25.69  17.15
TRAVERSE                 [      0.73]   1.89   2.42   2.10   2.08   1.90
TRIANGLE                 [      0.38]   2.84   4.16   5.21   5.24   2.87
RICHARDS                 [      0.39]   5.44  31.79  30.64   5.54   6.26
FACTORIAL                [      0.07]   1.29   3.29   3.00   1.57   1.57
FIB                      [      0.14]   2.43  24.43  24.21   2.43   2.36
FIB-RATIO                [      0.03]   1.67   2.33   2.33   1.67   1.67
ACKERMANN                [      0.46]   2.07  26.96  25.74   2.09   2.07
MANDELBROT/COMPLEX       [      0.18]   1.94   3.83   3.72   1.94   2.00
MANDELBROT/DFLOAT        [      0.00]  -1.00  -1.00  -1.00  -1.00  -1.00
MRG32K3A                 [      0.50]   2.46  11.40  10.06   2.40   2.48
CRC40                    [      0.29]  12.76 219.72 195.21  19.00  12.79
BIGNUM/ELEM-100-1000     [      0.06]   0.33   0.50   0.33   0.50   0.50
BIGNUM/ELEM-1000-100     [      0.09]   0.33   0.33   0.33   0.44   0.33
BIGNUM/ELEM-10000-1      [      0.05]   0.60   0.60   0.80   0.80   0.60
BIGNUM/PARI-100-10       [      0.01]   0.00   0.00   1.00   1.00   0.00
BIGNUM/PARI-200-5        [      0.03]   0.33   0.67   0.33   0.33   0.33
PI-DECIMAL/SMALL         [      0.36]   4.19   6.56   6.64   4.25   4.28
PI-DECIMAL/BIG           [      0.19]   5.68   8.89   8.89   5.79   5.68
PI-ATAN                  [      0.41]   0.49   0.63   0.73   0.51   0.46
PI-RATIOS                [      0.76]   0.64   0.75   0.74   0.63   0.64
HASH-STRINGS             [      0.12]   2.17  10.33  10.08   2.58   2.42
HASH-INTEGERS            [      0.20]   2.25   8.20   7.80   2.20   2.30
SLURP-LINES              [      0.60]   2.65   3.38   3.67   2.92   2.70
BOEHM-GC                 [      0.58]   4.90  29.43  28.97   5.02   5.43
DEFLATE-FILE             [      0.14]   2.64  33.71  34.71   3.71   3.00
1D-ARRAYS                [      0.03]   1.67  12.00  20.33   2.67   2.00
2D-ARRAYS                [      0.24]   3.04  62.42 126.00   7.17   6.67
3D-ARRAYS                [      0.68]   2.21  52.32 105.01  11.78   4.71
BITVECTORS               [      0.18]   9.50  11.06  11.00  11.00   9.44
BENCH-STRINGS            [      0.20]  12.95  19.65  12.90  12.90  12.45
fill-strings/adjustable  [      4.84]   0.24   3.38   3.80   1.03   0.84
STRING-CONCAT            [      1.58]   1.55   2.28   2.22   1.70   1.53
SEARCH-SEQUENCE          [      0.16]   5.13  14.69  31.94   8.06   6.94
CLOS/defclass            [      0.59]   0.29   0.31   0.44   0.44   0.31
CLOS/defmethod           [      2.70]   0.05   0.05   0.06   0.07   0.04
CLOS/instantiate         [      4.00]   4.14   4.60   4.51   4.47   4.18
CLOS/simple-instantiate  [      0.13] 148.31 158.00 161.85 161.77 152.54
CLOS/methodcalls         [      0.57]   3.37   3.81   3.33   3.11   3.58
CLOS/method+after        [      1.71]   1.08   1.09   1.10   1.05   1.06
CLOS/complex-methods     [      1.19]   1.19   1.25   1.04   1.08   1.21
EQL-SPECIALIZED-FIB      [      0.13]   8.62  14.85  16.92   8.77   8.31
Reference time in first column is in seconds; other columns are relative
Reference implementation: SBCL 1.0.29.11.debian
Impl ECLx : ECLx 10.4.2 (unstable tonight, compiled)
Impl ECLi : ECLi 10.4.2 (unstable interpreted)
Impl ECLOi: ECLOi 10.4.1 (stable interpreted)
Impl ECLO : ECLO 10.4.1 (stable compiled)
Impl ECL 1: ECL 10.4.2 (unstable compiled)


-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://tream.dreamhosters.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20100525/09c90f3d/attachment.html>


More information about the ecl-devel mailing list