source: project/chicken/branches/inlining/TODO @ 15323

Last change on this file since 15323 was 15323, checked in by felix winkelmann, 10 years ago

more intelligent inlining; standard-extension procedure in setup-api

File size: 11.0 KB
Line 
1TODO for chicken                                                        -*- Outline -*-
2================
3
4
5* bugs
6
7** compiler
8*** inlining breaks (benchmarks/boyer):
9    either we walk the inlined expr and have missing analysis results for renamed
10    vars or we miss required copy-propagations (possible solution: mark renamed
11    vars and add checks to all places where a non-existant analysis property may
12    trigger an optimization)
13*** pre-optimization
14**** changes call-sites and makes them invalid for later pre-optimization
15*** check profiling (-profile vs. profile-declaration)
16**** this doesn't always seem to work, in particular with library units
17**** ##sys#finish-profile should always be invoked
18     is it in `exit'?
19*** when re-defining intrinsics, the compiler should warn and disable re-writes
20    add declaration to keep re-writes enabled for core library files
21*** check in foreign.import.scm and compiler.import.scm whether the import
22    took place in the compiler
23*** -prologue, -epilogue, -prelude, -postlude should check for argument being directory
24    (reported by Eduardo Cavazos)
25
26** expander
27*** expansion of r5rs_pitfall 4.2 incorrect
28    possibly due to a non-aliased implicit "begin" somewhere
29*** dirty-macros.scm loops when using `defile'
30    possibly due to unrenamed special forms
31*** extended lambda-lists refer to `optional' and `let-optionals[*]'
32    this will break, when these macros are renamed on import or not imported
33    at all
34**** a possible solution is to use internal forms, provided by the "scheme" module.
35*** need way to force generating module-registration code for standalone executables.
36
37** modules
38*** `require-extension' fails in interpreter when extension is .so without import library
39    probably because load and import is in same toplevel form, and the
40    load is performed after the import (at runtime). A possibly fix
41    would be to load the extension immediately (at
42    compile-/expansion-time), when import is #t and o import lib
43    exists.
44*** mark import-source (module) on plist of imported symbols and use in re-import warning
45    doesn't work that easily, try to find another solution
46*** DSSSL lambda-lists need imports of `chicken' module ("optional", "let-optionals", ...)
47**** should probably use internal aliases
48
49** libraries
50*** library/runtime: cyclic list checks for assq/assv/assoc/memq/memv/member
51    and C_i_list_tail
52*** finalizers on lexically ref'd data not working in interpreter
53    reported by Jim Ursetto
54    reverted original patch, see patches/finalizer-closures.diff
55
56** tools
57*** chicken-bug: SMTP servers not accessible (greylisting)
58
59
60* tasks
61
62** branches
63*** try to improve performance in lazy-gensyms
64
65** module issues
66*** need a way to omit generating module registration without generating import lib
67    for example when compiling static version, where implib already exists
68*** code-duplication in compiler and evaluator for ##core#module
69*** "scheme" module does not include some special forms ("define-syntax", etc.)
70*** import-for-syntax imports value bindings into import-env
71    should actually be a distinct meta-import-env.
72    example: we need `(import-for-syntax chicken)' to have access to
73    `receive' in a procedural syntax definition.
74*** curried define performs expansion in empty se - problem?
75    (as comment in expand.scm indicated (##sys#register-export))
76*** check phase separation and module access
77**** see "expander" above
78*** consider adding support for unnamed modules
79
80** compiler
81*** test inlining with compiler modules
82*** (csc) generate object-files in /tmp (or TMPDIR)?
83*** option ("-M") to compile file as unnamed module (importing scheme + chicken)
84
85** setup/install
86*** setup-download
87**** use "HTTP_PROXY"/"http_proxy" env. var
88**** handle redirects in http-fetch
89**** option in chicken-install to list available eggs
90
91** library units
92*** read-mark list should be stored in read-table
93*** ports should have indicator slot about exact type (tcp, file, ...)
94*** normalize-pathname: return short name on windows? (mingw/msvc)
95*** Use record-descriptors instead of symbols as 1st slot in structure objects?
96**** see Kon's proposal for new record-descriptors in "misc/Chicken Runtime Data Type Proposal"
97*** Weak locatives can probably be used to implement weak hash-tables
98
99** syntax-error
100*** if ##sys#current-module is set, add name to error message?
101*** fluidly keep track of expanded forms (extend meaning of culprit) to pprint pruned expr on error
102
103** build
104*** need script to process import libraries for generating indices for doc.callcc.org
105    then tell Toby Butzon about it
106*** test DESTDIR and proper linking
107*** using "touch" with WINDOWS_SHELL won't work (need alternative)
108*** extend scripts/guess-platforms.sh for more platforms
109
110** scrutiny
111*** allow giving toplevel procedure names to `scrutinize' option?
112*** write test file to trigger every type of warning (diff with result file in test-suite)
113*** add support for keyword arguments and check even length and available keywords
114
115** libraries
116*** analyse usage statistics ("-debug v") of all core libraries
117
118
119* wiki
120
121** compatibility page
122
123
124* tests
125
126** optional longer run (env. var)
127*** syntax-rules-stress-test
128*** fully compiled ec-tests
129** 3-stage bootstrap with compiler-output comparison
130
131
132* optimizations
133
134** self-recursion optimization
135   what MacScheme called "benchmark-mode" (assume self-calls are recursion)
136*** needs declaration or option, >= -O2
137
138** when inlining, consing arg-list with "list" may make get-keyword possibly foldable
139
140** compiler-support for get-keyword ?
141
142** lambda-fusion / "fuse-and-dispatch" (suggested by Alex Shinn)
143   convert groups of local lambdas referenced to only in operator-position into
144   looping lambda + dispatch (static variable can be used), otherwise similar to
145   a conditional
146
147** lazy gensyms (see "lazy-gensyms" branch)
148
149** handle optional args primitively
150   for example, set to distinguished val (checking argc) on C level, core
151   primitive for checking this - should be quite simple, but llist processing
152   (decompose-lambda-list) will be more expensive and cumbersome.
153
154** pre-hashed symbols (extra symbol slot)
155   The memory usage should be acceptable, performance gain is hard to guess.
156   Some experiments indicate that hashing the string is cheaper than it appears,
157   but low-level hashtables should get the most of this (and thus speed up
158   the compiler)
159
160** Lisp2-hack by Dybvig
161*** add function-cell to symbol, call on direct call without checks
162*** initialized to trap function on set!/define, which does fixup
163*** would also allow inline-caching hacks
164
165
166* 4.0.9 benchmark results
167
168(c)2008-2009 The Chicken Team
169(c)2000-2007 Felix L. Winkelmann
170Version 4.0.9 - SVN rev. 15246
171linux-unix-gnu-x86 [ manyargs dload ptables applyhook ]
172compiled 2009-07-23 on x (Linux)
173
174
175CC:
176Using built-in specs.
177Target: i486-linux-gnu
178Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.3-5ubuntu4' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --with-tune=generic --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu
179Thread model: posix
180gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
181
182CFLAGS:
183-fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer -I/home/felix/include
184
185Running benchmarks ...
186
187  (averaging over 5 runs, dropping highest and lowest, binaries are statically linked and stripped)
188
189                     (runtime)                                  (code size)
190
191                     base       fast     unsafe        max      base      fast    unsafe       max
192                  ----------------------------------------------------------------------------------
1930                   0.000      0.000      0.000      0.000     1013k     1013k      902k      902k
194binarytrees         0.076      0.081      0.082      0.004     1021k     1021k      910k      910k
195boyer               0.053      0.052      0.053      0.004     1045k     1045k      934k      934k
196browse              0.088      0.086      0.073      0.072     1029k     1029k      918k      918k
197conform             0.108      0.072      0.072      0.064     1089k     1085k      954k      954k
198cpstak              0.272      0.250      0.208      0.169     1013k     1013k      906k      906k
199ctak                0.124      0.128      0.110      0.106     1017k     1017k      906k      906k
200dderiv              0.106      0.089      0.082      0.076     1021k     1021k      910k      910k
201deriv               0.078      0.081      0.068      0.078     1017k     1017k      910k      906k
202destructive         0.069      0.076      0.062      0.070     1017k     1017k      910k      906k
203div-iter            0.002      0.021      0.018      0.021     1013k     1013k      906k      906k
204div-rec             0.046      0.052      0.036      0.057     1013k     1013k      906k      906k
205dynamic             0.074      0.062      0.078      0.056     1293k     1285k     1078k     1078k
206earley              0.029      0.018      0.028      0.028     1073k     1065k      950k      950k
207fft                 0.046      0.032      0.028                1025k     1025k      914k      950k
208fib                 0.014      0.148      0.109      0.033     1013k     1013k      902k      902k
209fibc                1.464      0.854      0.736      0.572     1017k     1013k      906k      906k
210fprint              0.121      0.124      0.112      0.117     1017k     1017k      906k      906k
211fread               0.572      0.056      0.524      0.526     1013k     1013k      902k      902k
212hanoi               0.414      0.392      0.341      0.145     1013k     1013k      906k      902k
213lattice             5.228      5.109      4.156      4.168     1029k     1029k      918k      918k
214maze                0.136      0.112      0.085                1089k     1077k      946k      918k
215nbody               2.414      1.610      0.528                1045k     1033k      914k      918k
216nqueens             0.068      0.064      0.029      0.021     1017k     1017k      906k      906k
217puzzle              0.052      0.056      0.028      0.026     1037k     1037k      922k      918k
218scheme              0.025      0.014      0.010      0.010     1165k     1165k      998k      998k
219tak                 0.273      0.268      0.217      0.056     1013k     1013k      906k      902k
220takl                0.142      0.148      0.057      0.073     1017k     1017k      906k      906k
221takr                0.438      0.430      0.301      0.246     1125k     1125k      998k      998k
222traverse            0.224      0.150      0.012      0.112     1037k     1033k      914k      914k
223travinit            0.033      0.033      0.026      0.018     1037k     1033k      910k      910k
224triangl             0.546      0.553      0.042      0.377     1017k     1017k      906k      906k
225
226TOTAL              13.488     11.733      8.805      7.385
Note: See TracBrowser for help on using the repository browser.