Add benchmark

This commit is contained in:
2026-05-04 14:40:11 -07:00
parent b03ec9eba9
commit 4a6a09cff1
18 changed files with 3922 additions and 12 deletions
+22
View File
@@ -0,0 +1,22 @@
CC = cc
CFLAGS = -O2 -std=c11 -D_POSIX_C_SOURCE=199309L -I. -I/usr/include -Wall -Wextra
LDFLAGS = -lupb -lutf8_range
SRCS = hackers_bench.c hackers.upb.c hackers.upb_minitable.c
TARGET = hackers_bench
.PHONY: all clean regen
all: $(TARGET)
$(TARGET): $(SRCS)
$(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS)
# Re-generate upb files from proto/hackers.proto
regen:
protoc -I ../proto ../proto/hackers.proto \
--upb_out=. \
--upb_minitable_out=.
clean:
rm -f $(TARGET)