From 41b9fb5a1da19d5ccf67d82d77d3844781fa2558 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Fri, 14 Aug 2015 20:41:04 -0700 Subject: 1998 Spent a while trying to understand why editing a slightly larger program was so much slower. Then realized I'd managed to disable optimizations. --- makefile | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/makefile b/makefile index d06bc762..3c45c949 100644 --- a/makefile +++ b/makefile @@ -1,7 +1,7 @@ all: mu_bin core.mu mu_bin: makefile enumerate/enumerate tangle/tangle mu.cc termbox/libtermbox.a - c++ -g -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + c++ -g -O3 -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin # To see what the program looks like after all layers have been applied, read # mu.cc @@ -36,7 +36,16 @@ clang+opt: makefile mu.cc termbox/libtermbox.a autogenerated_lists clang++ -O3 -fsanitize=undefined mu.cc termbox/libtermbox.a -o mu_bin opt: makefile enumerate/enumerate tangle/tangle mu.cc termbox/libtermbox.a autogenerated_lists - g++ -O3 -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + c++ -O3 -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + +prof: makefile enumerate/enumerate tangle/tangle mu.cc termbox/libtermbox.a autogenerated_lists + c++ -pg -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + +opt+prof: makefile enumerate/enumerate tangle/tangle mu.cc termbox/libtermbox.a autogenerated_lists + c++ -O3 -pg -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin + +dbg+opt+prof: makefile enumerate/enumerate tangle/tangle mu.cc termbox/libtermbox.a autogenerated_lists + c++ -g -O3 -pg -Wall -Wextra -fno-strict-aliasing mu.cc termbox/libtermbox.a -o mu_bin # auto-generated files; by convention they end in '_list'. autogenerated_lists: mu.cc function_list test_list -- cgit 1.4.1-2-gfad0