perflab added

This commit is contained in:
2025-04-12 10:18:45 +08:00
parent a04c35be04
commit 4ea99d81a7
51 changed files with 350295 additions and 0 deletions

23
profile/Makefile Normal file
View File

@@ -0,0 +1,23 @@
# Makefile for word frequency analysis program
CC = icx
CFLAGS = -Ofast -pg
TARGET = prog
SOURCES = prog.c options.c
all: $(TARGET)
$(TARGET): $(SOURCES)
$(CC) $(CFLAGS) $(SOURCES) -o $(TARGET)
run: $(TARGET)
./$(TARGET) -file shakespeare.txt
profile: $(TARGET)
./$(TARGET) -file shakespeare.txt
gprof $(TARGET)
clean:
rm -f $(TARGET) gmon.out
.PHONY: all run profile clean