[Ecls-list] New changes uploaded

Juan Jose Garcia-Ripoll juanjose.garciaripoll at googlemail.com
Thu Jul 9 10:43:15 UTC 2009


Hi,

in the last weeks I have been travelling and had some time to hack the ECL
compiler. I have been and am still working on type propagations, that is for
instance inferring that the output of (+ 2 3.0) has to be a single float
because the arguments are an integer and a single float, respectively.

So far this phase was missing, or restricted to proclaimed functions with
only one possible type of output. By adding type propagating functions ECL
is slowly improving its knowledge about access to array, types of variables,
arithmetics and so on.

The results are so far promising. See below for a comparison of ECL with the
previous release and other implementations. Of particular interest are
precisely the test that involve the operations for which the type inference
has been implemented, with the spectacular results in MANDELBROT, or in the
arrays test.

There are two immediate consequences of this work. A positive one is that we
are discovering some mistakes in the inline forms and optimizers that ECL
used so far. The negative side is that those mistakes were until now hidden,
due to those optimizers not being used --there was not enough type
information available--, and we expect that some code might break with low
enough safety settings. I will try to solve those problems as soon as they
appear.

BTW, those changes have already been committed and I plan to make a release.
Feedback is welcome.

Juanjo


Benchmark                 Reference  CLISP  ECL 9  SBCL
-------------------------------------------------------------------------------------
COMPILER                 [      0.99]   1.01   0.90   0.85
LOAD-FASL                [      0.09]   4.51   0.96   1.79
SUM-PERMUTATIONS         [NIL       ]  -1.00  -1.00  -1.00
WALK-LIST/SEQ            [      0.04]   0.21   0.93   0.22
WALK-LIST/MESS           [      0.07]   1.74   0.94   0.26
BOYER                    [      4.53]   5.34   1.01   0.38
BROWSE                   [      0.37]   2.72   0.96   0.43
DDERIV                   [      0.68]   2.01   0.98   0.19
DERIV                    [      0.70]   2.18   0.96   0.21
DESTRUCTIVE              [      0.27]   3.97   1.04   0.48
DIV2-TEST-1              [      1.05]   1.99   0.94   0.17
DIV2-TEST-2              [      1.24]   2.19   1.12   0.20
FFT                      [      0.49]   5.52   1.31   0.06
FRPOLY/FIXNUM            [      0.52]   4.89   0.97   0.30
FRPOLY/BIGNUM            [      0.43]   2.95   1.00   0.44
FRPOLY/FLOAT             [      0.62]   4.59   0.98   0.38
PUZZLE                   [      1.04]   5.59   1.09   0.11
TAK                      [      0.29]   8.43   1.01   0.49
CTAK                     [      1.33]   1.92   0.99   0.12
TRTAK                    [      0.29]   8.19   1.00   0.48
TAKL                     [      0.22]  14.15   0.95   1.02
STAK                     [      0.32]   7.59   1.00   0.93
FPRINT/UGLY              [      1.33]   0.82   0.93   0.39
FPRINT/PRETTY            [     18.68]   0.08   0.99   0.06
TRAVERSE                 [      0.53]   8.63   1.09   0.62
TRIANGLE                 [      1.29]   8.02   1.15   0.23
RICHARDS                 [      0.48]  14.67   1.03   0.71
FACTORIAL                [      0.37]   1.93   1.02   0.37
FIB                      [      0.36]   4.31   0.97   0.41
FIB-RATIO                [      0.08]   0.45   0.99   0.31
ACKERMANN                [      0.94]   3.18   0.97   0.48
MANDELBROT/COMPLEX       [      0.68]   1.74   1.00   0.34
MANDELBROT/DFLOAT        [      0.04]  26.28  21.54   0.32
MRG32K3A                 [      2.24]   7.06   1.02   0.19
CRC40                    [     40.83]   1.54   0.90   0.15
BIGNUM/ELEM-100-1000     [      0.04]   0.74   0.98   2.33
BIGNUM/ELEM-1000-100     [      0.07]   1.21   0.98   3.27
BIGNUM/ELEM-10000-1      [      0.07]   1.10   1.00   3.55
BIGNUM/PARI-100-10       [      0.00]   2.46   1.20   3.00
BIGNUM/PARI-200-5        [      0.02]   1.92   1.00   2.30
PI-DECIMAL/SMALL         [      2.34]   0.46   0.99   0.28
PI-DECIMAL/BIG           [      2.17]   0.31   0.99   0.29
PI-ATAN                  [      0.79]   1.49   0.85   0.62
PI-RATIOS                [      0.69]   0.69   0.98   1.41
HASH-STRINGS             [      0.18]   4.73   1.76   0.54
HASH-INTEGERS            [      0.57]   2.34   1.07   0.41
SLURP-LINES              [      7.49]   0.69   0.89   0.21
BOEHM-GC                 [      3.94]   2.22   0.90   0.14
DEFLATE-FILE             [      0.37]   6.29   1.08   0.52
1D-ARRAYS                [      0.09]   5.44   1.26   0.27
2D-ARRAYS                [      1.80]   7.40   1.36   0.13
3D-ARRAYS                [     13.89]   1.92   1.09   0.05
BITVECTORS               [      3.85]   0.97   1.03   0.13
BENCH-STRINGS            [      3.30]   3.69   0.82   0.09
fill-strings/adjustable  [      6.57]   2.96   0.92   0.66
STRING-CONCAT            [      7.97]   2.04   0.58   0.21
SEARCH-SEQUENCE          [      1.49]   3.76   1.27   0.04
CLOS/defclass            [      0.55]   0.63   0.98   1.04
CLOS/defmethod           [      0.39]   0.24   0.95   6.71
CLOS/instantiate         [     62.01]   0.04   1.01   0.05
CLOS/simple-instantiate  [     34.75]   0.04   0.98   0.00
CLOS/methodcalls         [      3.00]   0.99   0.92   0.21
CLOS/method+after        [      2.76]   0.65   0.94   0.62
EQL-SPECIALIZED-FIB      [      1.21]   0.70   1.02   0.12
Reference time in first column is in seconds; other columns are relative
Reference implementation: ECL 9.7.1
Impl CLISP: CLISP 2.45 (2008-04-04) (built on benasque2.local
[192.168.1.103])
Impl ECL 9: ECL 9.6.2
Impl SBCL : SBCL 1.0.28
=== Test machine ===
   Machine-type: i386
   Machine-version: NIL



-- 
Instituto de Física Fundamental, CSIC
c/ Serrano, 113b, Madrid 28006 (Spain)
http://juanjose.garciaripoll.googlepages.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/ecl-devel/attachments/20090709/13a40ff7/attachment.html>


More information about the ecl-devel mailing list