From fcfe19c9f5648589c19e4add55c703fd8440b0f9 Mon Sep 17 00:00:00 2001 From: Tatsuyuki Ishi Date: Mon, 8 Dec 2025 12:27:46 +0900 Subject: [PATCH] Use -O2 optimization level by default I noticed some weird compiler behavior when looking at strutil assembly, and sure enough the compiler optimization level was stuck at -O1. Kati is not particularly slow to compile, so I propose defaulting to -O2. strutil_bench seems to be 16% faster with -O2. --- Makefile.ckati | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.ckati b/Makefile.ckati index 05cdc0d4..d585106d 100644 --- a/Makefile.ckati +++ b/Makefile.ckati @@ -70,7 +70,7 @@ KATI_CXX_TEST_EXES := $(patsubst $(KATI_INTERMEDIATES_PATH)/%.o,$(KATI_BIN_PATH) $(KATI_CXX_TEST_OBJS)) KATI_CXXFLAGS := -g -W -Wall -MMD -MP -KATI_CXXFLAGS += -O -DNOLOG +KATI_CXXFLAGS += -O2 -DNOLOG KATI_CXXFLAGS += -march=native #KATI_CXXFLAGS += -pg