Skip to content

Commit d736793

Browse files
committed
Benchmark: ocamlc
1 parent 16f5a43 commit d736793

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

benchmarks/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ all: _perf graphsnopr graphspr graphseff _noperf
1616
bench:
1717
$(MAKE) microbenchmarks
1818
$(MAKE) -C benchmark-fiat-crypto bench
19+
$(MAKE) -C benchmark-ocamlc bench
1920

2021
microbenchmarks:
2122
make _noprecomp

benchmarks/benchmark-ocamlc/Makefile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
.PHONY: bench perform
2+
3+
export NAME=Ocamlc
4+
5+
bench:
6+
cp -r ../sources/ml .
7+
$(MAKE) perform COMPILER=js_of_ocaml SCRIPT=ocamlc.js
8+
$(MAKE) perform COMPILER=wasm_of_ocaml SCRIPT=ocamlc.wasm.js
9+
10+
ARGS=ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml ml/*.ml
11+
12+
perform:
13+
time -f '{"compiler": "$(COMPILER)", "time":"%E", "mem":%R}' $(COMPILER) -q --opt 2 --pretty `which ocamlc.byte` -o $(SCRIPT) 2>&1 | sh ../utils/format_metrics.sh
14+
time -f '{"compiler": "$(COMPILER)", "time":"%E"}' node $(SCRIPT) -c $(ARGS) 2>&1 | sh ../utils/format_metrics.sh exec

0 commit comments

Comments
 (0)