diff options
| author | eunhhu <[email protected]> | 2026-10-09 15:14:51 +0100 |
|---|---|---|
| committer | eunhhu <[email protected]> | 2026-10-09 15:14:51 +0100 |
| commit | 1b7e9055f019ecf957e4cfbd659268149593c7cc (patch) | |
| tree | 198e6cd8accefd4bc01aa5cb896679c913415d60 /Makefile | |
| parent | 3e3812c74a4e60eece884553db03a90de13b5b0c (diff) | |
| download | pure-1b7e9055f019ecf957e4cfbd659268149593c7cc.tar.gz pure-1b7e9055f019ecf957e4cfbd659268149593c7cc.zip | |
Makefile: loops aligned in the batch executor alone (BATCH_OPTIMIZE): the lists' loops so aligned cost the bank's queries 0.8-2.0% more instructions (the padding) with their cycles mixed
Diffstat (limited to 'Makefile')
| -rw-r--r-- | Makefile | 14 |
1 files changed, 8 insertions, 6 deletions
@@ -41,13 +41,15 @@ $(BUILD)/obj/%.o: %.c $(HEADERS) # The lists' searches count a node's keys and positions whole, and move # items in a leaf column by column: -O3 makes vector instructions of them # (docs/design/020: 8% of a breadth first search). -# Their loops start each at a 64-byte line: else a change anywhere in the -# file moves them, and the batch executor's hot loops ran 6% apart with the -# same instructions (knapsack 8.26, 8.74, 8.20 ms; docs/research/138). -LIST_OPTIMIZE ?= -O3 -falign-loops=64 +LIST_OPTIMIZE ?= -O3 $(BUILD)/obj/core/module-list.o: CFLAGS += $(LIST_OPTIMIZE) -# A batch's instructions are loops over its lanes: vector instructions too (docs/design/024). -$(BUILD)/obj/core/module-batch.o: CFLAGS += $(LIST_OPTIMIZE) +# A batch's instructions are loops over its lanes: vector instructions too +# (docs/design/024), each loop at the start of a 64-byte line: else a change +# anywhere in the file moves them, and its hot loops ran 6% apart with the +# same instructions (knapsack 8.26, 8.74, 8.20 ms; docs/research/138). (The +# lists' loops so aligned cost the bank's queries 1-2% more instructions.) +BATCH_OPTIMIZE ?= $(LIST_OPTIMIZE) -falign-loops=64 +$(BUILD)/obj/core/module-batch.o: CFLAGS += $(BATCH_OPTIMIZE) # The links know nothing of the core: they build without its headers. $(BUILD)/obj/link/%.o: link/%.c $(wildcard link/*.h) |
