by triggering the prefetching decoder path (which used to be dedicated to long-range offsets only). Figures on my laptop : no content prefetch : ~300 MB/s (for reference) full content prefetch : ~325 MB/s (before this patch) new prefetch path : ~375 MB/s (after this patch) The benchmark speed is already significant, but another side-effect is that this version prefetch less data into memory, since it only prefetches what's needed, instead of the full dictionary. This is supposed to help highly active environments such as active databases, that can't be properly measured in benchmark environment (too clean). Also : fixed the largeNbDict test program which was working improperly when setting nbBlocks > nbFiles.
55 lines
1.5 KiB
Makefile
55 lines
1.5 KiB
Makefile
# ################################################################
|
|
# Copyright (c) 2018-present, Yann Collet, Facebook, Inc.
|
|
# All rights reserved.
|
|
#
|
|
# This source code is licensed under both the BSD-style license (found in the
|
|
# LICENSE file in the root directory of this source tree) and the GPLv2 (found
|
|
# in the COPYING file in the root directory of this source tree).
|
|
# ################################################################
|
|
|
|
PROGDIR = ../../programs
|
|
LIBDIR = ../../lib
|
|
|
|
LIBZSTD = $(LIBDIR)/libzstd.a
|
|
|
|
CPPFLAGS+= -I$(LIBDIR) -I$(LIBDIR)/common -I$(LIBDIR)/dictBuilder -I$(PROGDIR)
|
|
|
|
CFLAGS ?= -O3
|
|
CFLAGS += -std=gnu99
|
|
DEBUGFLAGS= -Wall -Wextra -Wcast-qual -Wcast-align -Wshadow \
|
|
-Wstrict-aliasing=1 -Wswitch-enum \
|
|
-Wstrict-prototypes -Wundef -Wpointer-arith -Wformat-security \
|
|
-Wvla -Wformat=2 -Winit-self -Wfloat-equal -Wwrite-strings \
|
|
-Wredundant-decls
|
|
CFLAGS += $(DEBUGFLAGS) $(MOREFLAGS)
|
|
|
|
|
|
default: largeNbDicts
|
|
|
|
all : largeNbDicts
|
|
|
|
largeNbDicts: util.o bench.o datagen.o xxhash.o largeNbDicts.c $(LIBZSTD)
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
|
|
|
.PHONY: $(LIBZSTD)
|
|
$(LIBZSTD):
|
|
$(MAKE) -C $(LIBDIR) libzstd.a CFLAGS="$(CFLAGS)"
|
|
|
|
bench.o : $(PROGDIR)/bench.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -c
|
|
|
|
datagen.o: $(PROGDIR)/datagen.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -c
|
|
|
|
util.o: $(PROGDIR)/util.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -c
|
|
|
|
|
|
xxhash.o : $(LIBDIR)/common/xxhash.c
|
|
$(CC) $(CPPFLAGS) $(CFLAGS) $^ -c
|
|
|
|
clean:
|
|
$(RM) *.o
|
|
$(MAKE) -C $(LIBDIR) clean > /dev/null
|
|
$(RM) largeNbDicts
|