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

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

tiny fixes

File size: 10.6 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*** test inlining with compiler modules
77*** (csc) generate object-files in /tmp (or TMPDIR)?
78*** option ("-M") to compile file as unnamed module (importing scheme + chicken)
79
80** setup/install
81*** setup-download
82**** use "HTTP_PROXY"/"http_proxy" env. var
83**** handle redirects in http-fetch
84**** option in chicken-install to list available eggs
85
86** library units
87*** read-mark list should be stored in read-table
88*** ports should have indicator slot about exact type (tcp, file, ...)
89*** normalize-pathname: return short name on windows? (mingw/msvc)
90*** Use record-descriptors instead of symbols as 1st slot in structure objects?
91**** see Kon's proposal for new record-descriptors in "misc/Chicken Runtime Data Type Proposal"
92*** Weak locatives can probably be used to implement weak hash-tables
93
94** syntax-error
95*** if ##sys#current-module is set, add name to error message?
96*** fluidly keep track of expanded forms (extend meaning of culprit) to pprint pruned expr on error
97
98** build
99*** need script to process import libraries for generating indices for doc.callcc.org
100    then tell Toby Butzon about it
101*** using "touch" with WINDOWS_SHELL won't work (need alternative) (mingw/non-msys build)
102*** extend scripts/guess-platforms.sh for more platforms
103
104** scrutiny
105*** allow giving toplevel procedure names to `scrutinize' option?
106*** write test file to trigger every type of warning (diff with result file in test-suite)
107*** add support for keyword arguments and check even length and available keywords
108
109
110* wiki
111
112** compatibility page
113
114
115* tests
116
117** optional longer run (env. var)
118*** syntax-rules-stress-test
119*** fully compiled ec-tests
120** 3-stage bootstrap with compiler-output comparison
121
122
123* optimizations
124
125** self-recursion optimization
126   what MacScheme called "benchmark-mode" (assume self-calls are recursion)
127*** needs declaration or option, >= -O2
128
129** when inlining, consing arg-list with "list" may make get-keyword possibly foldable
130
131** compiler-support for get-keyword ?
132
133** lambda-fusion / "fuse-and-dispatch" (suggested by Alex Shinn)
134   convert groups of local lambdas referenced to only in operator-position into
135   looping lambda + dispatch (static variable can be used), otherwise similar to
136   a conditional
137
138** lazy gensyms (see "lazy-gensyms" branch)
139
140** handle optional args primitively
141   for example, set to distinguished val (checking argc) on C level, core
142   primitive for checking this - should be quite simple, but llist processing
143   (decompose-lambda-list) will be more expensive and cumbersome.
144
145** pre-hashed symbols (extra symbol slot)
146   The memory usage should be acceptable, performance gain is hard to guess.
147   Some experiments indicate that hashing the string is cheaper than it appears,
148   but low-level hashtables should get the most of this (and thus speed up
149   the compiler)
150
151** Lisp2-hack by Dybvig
152*** add function-cell to symbol, call on direct call without checks
153*** initialized to trap function on set!/define, which does fixup
154*** would also allow inline-caching hacks
155
156
157* 4.0.9 benchmark results
158
159(c)2008-2009 The Chicken Team
160(c)2000-2007 Felix L. Winkelmann
161Version 4.0.9 - SVN rev. 15246
162linux-unix-gnu-x86 [ manyargs dload ptables applyhook ]
163compiled 2009-07-23 on x (Linux)
164
165
166CC:
167Using built-in specs.
168Target: i486-linux-gnu
169Configured 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
170Thread model: posix
171gcc version 4.3.3 (Ubuntu 4.3.3-5ubuntu4)
172
173CFLAGS:
174-fno-strict-aliasing -DHAVE_CHICKEN_CONFIG_H -Os -fomit-frame-pointer -I/home/felix/include
175
176Running benchmarks ...
177
178  (averaging over 5 runs, dropping highest and lowest, binaries are statically linked and stripped)
179
180                     (runtime)                                  (code size)
181
182                     base       fast     unsafe        max      base      fast    unsafe       max
183                  ----------------------------------------------------------------------------------
1840                   0.000      0.000      0.000      0.000     1013k     1013k      902k      902k
185binarytrees         0.076      0.081      0.082      0.004     1021k     1021k      910k      910k
186boyer               0.053      0.052      0.053      0.004     1045k     1045k      934k      934k
187browse              0.088      0.086      0.073      0.072     1029k     1029k      918k      918k
188conform             0.108      0.072      0.072      0.064     1089k     1085k      954k      954k
189cpstak              0.272      0.250      0.208      0.169     1013k     1013k      906k      906k
190ctak                0.124      0.128      0.110      0.106     1017k     1017k      906k      906k
191dderiv              0.106      0.089      0.082      0.076     1021k     1021k      910k      910k
192deriv               0.078      0.081      0.068      0.078     1017k     1017k      910k      906k
193destructive         0.069      0.076      0.062      0.070     1017k     1017k      910k      906k
194div-iter            0.002      0.021      0.018      0.021     1013k     1013k      906k      906k
195div-rec             0.046      0.052      0.036      0.057     1013k     1013k      906k      906k
196dynamic             0.074      0.062      0.078      0.056     1293k     1285k     1078k     1078k
197earley              0.029      0.018      0.028      0.028     1073k     1065k      950k      950k
198fft                 0.046      0.032      0.028                1025k     1025k      914k      950k
199fib                 0.014      0.148      0.109      0.033     1013k     1013k      902k      902k
200fibc                1.464      0.854      0.736      0.572     1017k     1013k      906k      906k
201fprint              0.121      0.124      0.112      0.117     1017k     1017k      906k      906k
202fread               0.572      0.056      0.524      0.526     1013k     1013k      902k      902k
203hanoi               0.414      0.392      0.341      0.145     1013k     1013k      906k      902k
204lattice             5.228      5.109      4.156      4.168     1029k     1029k      918k      918k
205maze                0.136      0.112      0.085                1089k     1077k      946k      918k
206nbody               2.414      1.610      0.528                1045k     1033k      914k      918k
207nqueens             0.068      0.064      0.029      0.021     1017k     1017k      906k      906k
208puzzle              0.052      0.056      0.028      0.026     1037k     1037k      922k      918k
209scheme              0.025      0.014      0.010      0.010     1165k     1165k      998k      998k
210tak                 0.273      0.268      0.217      0.056     1013k     1013k      906k      902k
211takl                0.142      0.148      0.057      0.073     1017k     1017k      906k      906k
212takr                0.438      0.430      0.301      0.246     1125k     1125k      998k      998k
213traverse            0.224      0.150      0.012      0.112     1037k     1033k      914k      914k
214travinit            0.033      0.033      0.026      0.018     1037k     1033k      910k      910k
215triangl             0.546      0.553      0.042      0.377     1017k     1017k      906k      906k
216
217TOTAL              13.488     11.733      8.805      7.385
218
219
220** These benchmarks are meaningless - find real ones.
Note: See TracBrowser for help on using the repository browser.