Closed tanyongkiam closed 7 years ago
@tanyongkiam is this done now?
I've been thinking of actually undoing this change or recovering the old benchmarks at some point.
Reason: it is hard to hand-trace the compiler when the entire basis is included.
Why would you need to hand-trace the compiler? I suggest having a single benchmark/example used for such debugging, but the real benchmarks use the basis and are in concrete syntax. Also, I think this issue can probably be closed either way, right?
Sure, this one can be closed.
Hand-tracing is fairly useful, I've found several performance bugs by doing that in the past.
The benchmarks currently make direct use of CakeML AST for things like Array.sub -> Op Asub.
When "Array.sub" is parsed, this instead turns into a long Opapp ... ( ... ), where Array.sub is assumed to already be in the basis.
This makes it annoying to write new benchmarks in concrete syntax, because using
EVAL``(parse_prog o lexer_fun) "... insert benchmark here ..." ``
This shouldn't affect the speed of the benchmarks because all (or most of) the basis stubs can be inlined.
However, it will make some bits of the in-logic compilation slower. It might be useful to use Ramana's parallel evaluation machinery in bootstrap/