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

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

added note about test

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