restored assert() in paramgrill
assert() in paramgrill are not in the benchmark path. They should remain active, as they don't impact measurements, and their runtime is insignificant.
This commit is contained in:
+1
-1
@@ -200,7 +200,7 @@ zstreamtest-dll : $(ZSTDDIR)/common/xxhash.c # xxh symbols not exposed from dll
|
|||||||
zstreamtest-dll : $(ZSTREAM_LOCAL_FILES)
|
zstreamtest-dll : $(ZSTREAM_LOCAL_FILES)
|
||||||
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(filter %.c,$^) $(LDFLAGS) -o $@$(EXT)
|
||||||
|
|
||||||
paramgrill : DEBUGFLAGS = -DNDEBUG # turn off assert() for speed measurements
|
paramgrill : DEBUGFLAGS = # turn off assert() by default for speed measurements
|
||||||
paramgrill : $(ZSTD_FILES) $(PRGDIR)/bench.c $(PRGDIR)/datagen.c paramgrill.c
|
paramgrill : $(ZSTD_FILES) $(PRGDIR)/bench.c $(PRGDIR)/datagen.c paramgrill.c
|
||||||
$(CC) $(FLAGS) $^ -lm -o $@$(EXT)
|
$(CC) $(FLAGS) $^ -lm -o $@$(EXT)
|
||||||
|
|
||||||
|
|||||||
@@ -1544,6 +1544,7 @@ static int allBench(BMK_benchResult_t* resultPtr,
|
|||||||
U64 loopDurationC = 0, loopDurationD = 0;
|
U64 loopDurationC = 0, loopDurationD = 0;
|
||||||
double uncertaintyConstantC = 3., uncertaintyConstantD = 3.;
|
double uncertaintyConstantC = 3., uncertaintyConstantD = 3.;
|
||||||
double winnerRS;
|
double winnerRS;
|
||||||
|
|
||||||
/* initial benchmarking, gives exact ratio and memory, warms up future runs */
|
/* initial benchmarking, gives exact ratio and memory, warms up future runs */
|
||||||
CBENCHMARK(1, benchres, tmp, BMK_both, 1);
|
CBENCHMARK(1, benchres, tmp, BMK_both, 1);
|
||||||
|
|
||||||
@@ -1568,6 +1569,9 @@ static int allBench(BMK_benchResult_t* resultPtr,
|
|||||||
return WORSE_RESULT;
|
return WORSE_RESULT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assert(loopDurationC >= TIMELOOP_NANOSEC / 10);
|
||||||
|
assert(loopDurationD >= TIMELOOP_NANOSEC / 10);
|
||||||
|
|
||||||
/* second run, if first run is too short, gives approximate cSpeed + dSpeed */
|
/* second run, if first run is too short, gives approximate cSpeed + dSpeed */
|
||||||
CBENCHMARK(loopDurationC < TIMELOOP_NANOSEC / 10, benchres, tmp, BMK_compressOnly, 1);
|
CBENCHMARK(loopDurationC < TIMELOOP_NANOSEC / 10, benchres, tmp, BMK_compressOnly, 1);
|
||||||
CBENCHMARK(loopDurationD < TIMELOOP_NANOSEC / 10, benchres, tmp, BMK_decodeOnly, 1);
|
CBENCHMARK(loopDurationD < TIMELOOP_NANOSEC / 10, benchres, tmp, BMK_decodeOnly, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user