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