lean4-htt/tests
Leonardo de Moura fabf7f6380 perf(library/equations_compiler, library/compiler): expand auxiliary _match_idx definitions when generating byte code
We use the auxiliary procedure pull_nested_rec_fn to pull recursive
application in nested match expressions. This is needed because the
nested match expression is compiled before we process the recursive
procedure that contains it. This transformation may produce
performance problems if the recursive application does not depend on
the data being matched. Here is an example from the new test:

```
def tst : tree → nat
| (tree.leaf v) := v
| (tree.node v l r) :=
  match f v with
  | tt := tst l
  | ff := tst r
  end
```

pull_nested_rec_fn will convert it into

```
def tst : tree → nat
| (tree.leaf v)     := v
| (tree.node v l r) := tst._match_1 (f v) (tst l) (tst r)
```

Since our interpreter uses eager evaluation, both `(tst l)` and `(tst r)`
are executed. This commit fixes this issue by expanding `tst._match_1`
during code generation.
2017-11-09 11:14:57 -08:00
..
lean perf(library/equations_compiler, library/compiler): expand auxiliary _match_idx definitions when generating byte code 2017-11-09 11:14:57 -08:00
.gitignore chore(tests/lean,shell/lean): run leantests and leanruntests in parallel 2017-03-30 06:04:00 +02:00