Skip to content

Commit

Permalink
Merge pull request #386 from iacore/fix-bench-time
Browse files Browse the repository at this point in the history
Use time (shell builtin) when benchmarking
  • Loading branch information
vnmakarov authored Jan 17, 2024
2 parents 55ec6a7 + fe75bff commit 78ec6b9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions GNUmakefile
Original file line number Diff line number Diff line change
Expand Up @@ -706,10 +706,10 @@ gen-bench2: $(BUILD_DIR)/c2m # Ignore M1 MacOs as it needs another procedure to
echo +++++ Compiling and generating all code for c2m: +++++;\
for i in 0 1 2 3;do \
echo === Optimization level $$i:;\
echo 'int main () {return 0;}'\
| /usr/bin/time $(BUILD_DIR)/c2m -O$$i -Dx86_64 -I$(SRC_DIR) $(SRC_DIR)/mir-gen.c $(SRC_DIR)/c2mir/c2mir.c\
$(SRC_DIR)/c2mir/c2mir-driver.c $(SRC_DIR)/mir.c -el -i;\
rm -f a.bmir;\
echo 'int main () {return 0;}' > a.c;\
time $(BUILD_DIR)/c2m -O$$i -Dx86_64 -I$(SRC_DIR) $(SRC_DIR)/mir-gen.c $(SRC_DIR)/c2mir/c2mir.c\
$(SRC_DIR)/c2mir/c2mir-driver.c $(SRC_DIR)/mir.c -el -i < a.c;\
rm -f a.c a.bmir;\
done;\
fi

Expand Down

0 comments on commit 78ec6b9

Please sign in to comment.