2003-12-13 Zoltan Varga <vargaz@freemail.hu>
[mono.git] / mono / mini / TODO
1 * use a pool of MBState structures to speedup monoburg instead of using a
2   mempool.
3 * the decode tables in the burg-generated could use short instead of int
4   (this should save about 1 KB)
5 * track the use of ESP, so that we can avoid the x86_lea in the epilog
6
7
8 Other Ideas:
9
10 * the ORP people avoids optimizations inside catch handlers - just to save
11   memory (for example allocation of strings - instead they allocate strings when
12   the code is executed (like the --shared option)). But there are only a few
13   functions using catch handlers, so I consider this a minor issue.
14
15 * some performance critical functions should be inlined. These include:
16         - mono_mempool_alloc and mono_mempool_alloc0
17         - EnterCriticalSection and LeaveCriticalSection
18         - TlsSetValue
19         - mono_metadata_row_col
20         - mono_g_hash_table_lookup
21         - mono_domain_get
22 * the managed/unmanaged boundary is quite slow:
23         - it calls mono_get_lmf_addr, which calls TlsGetValue, which calls
24       pthread_getspecific (). This means that 3 function calls are needed for
25       each native function call.
26
27 * if a function which involves locking is called from another function which
28   acquires the same lock, it might be useful to create a separate _inner 
29   version of the function which does not re-acquire the lock. This is a perf
30   win only if the function is called a lot of times, like mono_get_method.
31
32 * the frame_state_for function in glibc 2.3.2 can't correctly decipher the 
33   unwind tables generated by gcc 3.3. It allways tells the runtime that not all
34   callee saved registers are saved, even when the icall is marked with
35   MONO_ARCH_SAVE_REGS. This forces the runtime to generate wrapper functions
36   for all icalls, slowing things down greatly.
37
38 * we can avoid calls to class init trampolines if the are multiple calls to the
39   same trampoline in the same basic block. See:
40
41   http://bugzilla.ximian.com/show_bug.cgi?id=51096
42
43 Usability
44 ---------
45
46 * Remove the various optimization list of flags description, have an 
47   extra --help-optimizations flag.
48
49 * Remove the various graph options, have a separate --help-graph for 
50   that list.
51