lama_byterun/bench/README.md
Kakadu b07cdebe7f Added Demo about infix
Signed-off-by: Kakadu <Kakadu@pm.me>
2020-12-11 18:06:33 +03:00

26 lines
973 B
Markdown

#### Benchmark suite for pretty printing
Files:
- `p.ml` -- an implementation of pretty-printer in meta-language
- `pp_default.m4` -- macro that converts `p.ml` into strightforward pretty printer
- `pp_gt.m4` -- a macro that converts `p.ml` into GT-based pretty printer
- `bench_main.ml` -- runner of benhcmark1
- `demo_infix.ml` -- demo about infix operator pretty printing
Compilation: hit `make`.
###### Benchmark `bench.exe`
Searches for input files in `../stdlib` or `./stdlib` and measures two pretty-printers:
- straightforward one from `Pprint_default.ml` (generated by `pp_default.m4` from `p.ml`)
- the one using our approach: `Pprint_gt.ml` (generated by `pp_gt.m4` from `p.ml`)
###### demo `demo_infix.exe`
Pretty prints a small piece of code by two approaches:
- generated using our approach: `Pprint_gt.ml`
- modified `Pprint_gt.ml`: we are printing infix names in a prettier way. It is not possible to modify straightforward approach without pain