Change compiler optimizations to -O3 -flto (#11207)
Optimization update from -O2 to -O3 -flto gives up to 5% performance gain in 'redis-benchmarks-spec-client-runner' tests geomean where GCC 9.4.0 is used for build * Fix for false-positive warning in bitops.c Warning appeared with O3, on CentOS during inlininig procedure * Fixed unitialized streamID within streamTrim() (#1) Co-authored-by: filipe oliveira <filipecosta.90@gmail.com>
This commit is contained in:
parent
3c02d1acc4
commit
3469c6509c
@ -15,7 +15,7 @@
|
|||||||
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
||||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||||
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
||||||
OPTIMIZATION?=-O2
|
OPTIMIZATION?=-O3 -flto
|
||||||
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram
|
DEPENDENCY_TARGETS=hiredis linenoise lua hdr_histogram
|
||||||
NODEPS:=clean distclean
|
NODEPS:=clean distclean
|
||||||
|
|
||||||
|
@ -1180,7 +1180,9 @@ void bitfieldGeneric(client *c, int flags) {
|
|||||||
addReplyNull(c);
|
addReplyNull(c);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
uint64_t oldval, newval, wrapped, retval;
|
/* Initialization of 'wrapped' is required to avoid
|
||||||
|
* false-positive warning "-Wmaybe-uninitialized" */
|
||||||
|
uint64_t oldval, newval, retval, wrapped = 0;
|
||||||
int overflow;
|
int overflow;
|
||||||
|
|
||||||
oldval = getUnsignedBitfield(o->ptr,thisop->offset,
|
oldval = getUnsignedBitfield(o->ptr,thisop->offset,
|
||||||
|
@ -747,7 +747,7 @@ int64_t streamTrim(stream *s, streamAddTrimArgs *args) {
|
|||||||
streamDecodeID(ri.key, &master_id);
|
streamDecodeID(ri.key, &master_id);
|
||||||
|
|
||||||
/* Read last ID. */
|
/* Read last ID. */
|
||||||
streamID last_id;
|
streamID last_id = {0,0};
|
||||||
lpGetEdgeStreamID(lp, 0, &master_id, &last_id);
|
lpGetEdgeStreamID(lp, 0, &master_id, &last_id);
|
||||||
|
|
||||||
/* We can remove the entire node id its last ID < 'id' */
|
/* We can remove the entire node id its last ID < 'id' */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user