17452dba48
Most of the time, downsampling is needed for Provides versions, which are expensive, and values are reduced by only 1 bit, which can be implemented without sorting the values again. Indeed, only a merge is required. The array v[] can be split into two parts: the first part v1[] and the second part v2[], the latter having values with high bit set. After the high bit is stripped, v2[] values are still sorted. It suffices to merge v1[] and v2[]. Note that, however, a merge cannot be done inplace, and also we have to support 2 or more downsampling steps. We also want to avoid copying. This requires careful buffer management - each version needs two alternate buffers. callgrind annotations for "apt-cache <<<unmet", previous commit: 2,743,058,808 PROGRAM TOTALS 1,068,102,605 lib/set.c:decode_base62_golomb 509,186,920 lib/set.c:rpmsetcmp 131,678,282 stdlib/msort.c:msort_with_tmp'2 93,496,965 sysdeps/x86_64/strcmp.S:__GI_strcmp 91,066,266 sysdeps/x86_64/memcmp.S:bcmp 83,062,668 sysdeps/x86_64/strlen.S:__GI_strlen 64,584,024 sysdeps/x86_64/memcpy.S:memcpy callgrind annotations for "apt-cache <<<unmet", this commit: 2,683,295,262 PROGRAM TOTALS 1,068,102,605 lib/set.c:decode_base62_golomb 510,261,969 lib/set.c:rpmsetcmp 93,692,793 sysdeps/x86_64/strcmp.S:__GI_strcmp 91,066,275 sysdeps/x86_64/memcmp.S:bcmp 90,080,205 stdlib/msort.c:msort_with_tmp'2 83,062,524 sysdeps/x86_64/strlen.S:__GI_strlen 58,165,691 sysdeps/x86_64/memcpy.S:memcpy |
||
---|---|---|
.gear | ||
autodeps | ||
build | ||
doc | ||
lib | ||
po | ||
python | ||
rpmdb | ||
rpmio | ||
scripts | ||
tools | ||
.gitignore | ||
.lclintrc | ||
build.c | ||
build.h | ||
CHANGES | ||
configure.in | ||
COPYING | ||
CREDITS | ||
debug.h | ||
Doxyfile.in | ||
Doxyheader | ||
gendiff | ||
GROUPS | ||
INSTALL | ||
installplatform | ||
macros.in | ||
Makefile.am | ||
platform.in | ||
README | ||
README.ALT-ru_RU.UTF-8 | ||
rpm2cpio.c | ||
rpm-4_0.spec | ||
rpm-build.buildreq | ||
rpminit | ||
rpminit.1 | ||
rpmpopt.in | ||
rpmqv.c | ||
rpmrc.in | ||
system.h | ||
TODO |
This is RPM, the Red Hat Package Manager. The latest releases are always available at: ftp://ftp.rpm.org/pub/rpm Additional RPM documentation (papers, slides, HOWTOs) can also be found at the same site, as well as http://www.rpm.org. There is a mailing list for discussion of RPM issues, rpm-list@redhat.com. To subscribe, send a message to rpm-list-request@redhat.com with the word "subscribe" in the subject line. RPM was originally written by: Erik Troan <ewt@redhat.com> Marc Ewing <marc@redhat.com> See the CREDITS file for a list of folks who have helped us out tremendously. RPM is Copyright (c) 1998 by Red Hat Software, Inc., and may be distributed under the terms of the GPL and LGPL (see the file COPYING for details).