I just committed a small change as a result of profiling Mint programs: We are now treating all compiler invocations as one long compile session, instead of having many short ones during the execution of a Mint program. This reduces overhead since each symbol only needs to be completed once.
Compile times are cut by a factor of about 3 in our benchmarks. Not as much as I’d hoped, but it’s a start. It seems like my initial estimates were skewed by the presence of the profiler itself.
I’m going to profile again now.
Update:
I got another improvement by a factor of about 1.5 by replacing an O(n) list append with an O(1) list prepend. But I think now it will be difficult to get anything more without major rewrites of the compiler.
Compiling now represents 11% of a profiled run of LintFib, parsing is 1% (keep in mind that profiling skews the percentages).