Files
gf-core/testsuite/lpgf/README.md

41 lines
1023 B
Markdown

# LPGF testsuite & benchmark
## Test
LPGF must be equivalent to PGF in terms of linearisation output.
Possible exceptions:
- No handling of variants (design choice)
- Rendering of missing fucntions
## Benchmark
### Compilation
Comparing PGF, LPGF along following criteria:
- Time
- Memory
- Binary file size
### Runtime (linearisation)
Comparing PGF, PGF2, LPGF along following criteria:
- Time
- Memory
### Running
Run each command separately so that memory measurements are isolated.
The `+RTS -T -RTS` is so that GHC can report its own memory usage.
```
stack build --test --bench --no-run-tests --no-run-benchmarks
stack bench --benchmark-arguments "compile pgf Foods*.gf +RTS -T -RTS"
stack bench --benchmark-arguments "compile lpgf Foods*.gf +RTS -T -RTS"
stack bench --benchmark-arguments "run pgf Foods.pgf foods.trees +RTS -T -RTS"
stack bench --benchmark-arguments "run pgf2 Foods.pgf foods.trees +RTS -T -RTS"
stack bench --benchmark-arguments "run lpgf Foods.lpgf foods.trees +RTS -T -RTS"
```