Commit Graph

1757 Commits

Author SHA1 Message Date
Alexey Tourbin
f332ec8636 bsearch.h: initial revision 2011-01-06 03:30:42 +03:00
Alexey Tourbin
add6349fea system.h: moved AUTO_REALLOC from depends.h 2011-01-06 03:26:09 +03:00
Alexey Tourbin
523b00db6e depends.c (rpmRangesOverlap): avoid extra strcmp calls 2011-01-06 03:24:14 +03:00
Alexey Tourbin
4d5831af27 strcasecmp.c: enhanced with table lookup 2011-01-06 03:22:55 +03:00
Alexey Tourbin
96d67572ce 4.0.4-alt100.7
- set.c: Reverted Kirill's changes.
- set.c: Applied aggressive optimization techniques (30% speed-up).
2011-01-04 11:14:18 +03:00
Alexey Tourbin
0f99bd9e13 spec: compile set.c with -fprofile-* options
callgrind results for "apt-cache unmet", 4.0.4-alt100.6:
2,215,614,910  PROGRAM TOTALS
1,126,021,045  ???:decode_set
  486,259,420  ???:rpmsetcmp
  147,177,041  ???:strcmp
   79,769,617  ???:strlen
   61,764,819  ???:0x0000000000033080'2
   54,573,169  ???:memcpy
   31,477,402  ???:strcpy
   24,471,167  ???:pkgCache::DepIterator::AllTargets()

callgrind results for "apt-cache unmet", this commit (built in hasher):
1,502,995,357  PROGRAM TOTALS
625,132,308  ???:decode_base62_golomb
374,940,745  ???:rpmsetcmp
 91,031,162  ???:strcmp
 69,615,481  ???:strlen
 61,764,819  ???:0x0000000000033080'2
 30,928,154  ???:memcpy
 26,108,178  ???:strcpy
 24,471,167  ???:pkgCache::DepIterator::AllTargets()

Average user time for "apt-shell <<<unmet", 4.0.4-alt100.6:
2.55s

Average user time for "apt-shell <<<unmet", this commit (built in hasher):
1.72s
2011-01-04 10:51:34 +03:00
Alexey Tourbin
9380d2ec53 tools/Makefile.am: compile setcmp.static, for profiling 2011-01-04 09:31:52 +03:00
Alexey Tourbin
afe9677742 tools/setcmp.c: with argc==1, read versions from stdin 2011-01-04 09:05:29 +03:00
Alexey Tourbin
cf36274cb9 header.h: shut up -Wextra warning
header.h: In function 'headerFreeData':
header.h:705:11: error: comparison between signed and unsigned integer expressions
2011-01-03 09:52:38 +03:00
Alexey Tourbin
42db4e0a9d set.c: final touches 2011-01-03 09:24:15 +03:00
Alexey Tourbin
73adeec07e set.c: cache short deltas
After base62+golomb decoding, most deltas are under 65536 (in Provides
versions, average delta should be around 1536).  So the whole version
can be stored using short deltas, effectively halving memory footprint.
However, this seems to be somewhat slower: per-delta copying and
decode_golomb must be invoked to recover hash values.  On the other
hand, this allows to increase cache size (128 -> 192).  But note that,
with larger cache sizes, LRU linear search will take longer.  So this is
a compromise - and apparently a favourable one.
2011-01-03 09:04:50 +03:00
Alexey Tourbin
b674d2bc31 set.c: tweak delta routines and maskv 2011-01-03 08:21:13 +03:00
Alexey Tourbin
ebe77a46cd set.c: avoid extra strcmp calls in the caching code 2011-01-03 08:21:12 +03:00
Alexey Tourbin
46f3968205 set.c: optimize array access in rpmsetcmp
callgrind results for "apt-cache unmet", 4.0.4-alt100.6:
2,198,298,537  PROGRAM TOTALS
1,115,738,267  lib/set.c:decode_set
  484,035,006  lib/set.c:rpmsetcmp
  143,078,002  ???:strcmp
   79,477,321  ???:strlen
   61,780,572  ???:0x0000000000033080'2
   54,466,947  ???:memcpy
   31,161,399  ???:strcpy
   24,438,336  ???:pkgCache::DepIterator::AllTargets()

callgrind results for "apt-cache unmet", this commit:
1,755,431,664  PROGRAM TOTALS
764,189,271  lib/set.c:decode_base62_golomb
404,493,494  lib/set.c:rpmsetcmp
143,076,968  ???:strcmp
 70,833,953  ???:strlen
 61,780,572  ???:0x0000000000033080'2
 54,466,947  ???:memcpy
 31,161,399  ???:strcpy
 24,438,336  ???:pkgCache::DepIterator::AllTargets()
2011-01-03 08:21:10 +03:00
Alexey Tourbin
d1ad36aef1 set.c: implemented combined base62+golomb decoding routine 2011-01-03 08:20:55 +03:00
Alexey Tourbin
bb21779d02 set.c: facilitate base62 decoding with table lookup 2011-01-03 02:06:07 +03:00
Alexey Tourbin
61866ee15a set.c: minor base62 tweaks 2011-01-03 02:05:11 +03:00
Alexey Tourbin
a2f26af268 set.c: reverted Kirill's changes 2011-01-02 06:39:32 +03:00
676a19a7af 4.0.4-alt100.6
- rpmRangesOverlap: Optimized out unneeded calls to printDepend().
- set.c: Cleaned up and optimized (Kirill Shutemov).
2010-12-07 17:43:44 +00:00
Kirill A. Shutemov
4b05315a84 set.c: optimize decode_golomb()
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
4d9409cb9c set.c: optimize putbits()
Use bit operations instead of cycles.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
6a9ce451bc set.c: use packed bitmap for bit vector
Currently, set.c uses array of chars to store bit vector. Each char
stores one bit: 0 or 1.

Let's use packed bitmap instead. It creates room for optimizations.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
6afa2793f8 set.c: cleanup self-tests
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
82a064020b set.c: use function-like syntax for sizeof.
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
d7ece41758 set.c: do not mix declarations and code
Let's move variable declarations to the begin of blocks.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:58:43 +00:00
Kirill A. Shutemov
82da3b0f49 set.c: slightly reformat code to increase its readability
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:57:43 +00:00
Kirill A. Shutemov
5c39279236 set.c: fixup self-test functions declaration
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:56:19 +00:00
Kirill A. Shutemov
4226027fbb set.c: get rid of nested functions
Nested function in C is GCC extension.
Let's try to follow ANSI C syntax.

Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:56:19 +00:00
Kirill A. Shutemov
75a4506d75 set.c, set.h: get rid of C++-style comments
Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>
2010-12-07 16:56:19 +00:00
c7167f0395 lib/depends.c (rpmRangesOverlap): optimize out unneeded calls to printDepend()
This optimization speeds up rpmRangesOverlap() by 10%.
2010-12-04 17:30:16 +00:00
Alexey Tourbin
b7503c5d27 4.0.4-alt100.5
- set.c: Implemented LRU caching (2x speed-up, 1M footprint).
2010-12-04 13:34:18 +03:00
Alexey Tourbin
fc5b5a5f7d set.c: implemented LRU caching (2x speed-up, 1M footprint) 2010-12-04 13:11:45 +03:00
b1e16e7d9b 4.0.4-alt100.4
- Compiled set.c with -O3.
2010-11-23 22:00:39 +00:00
6104dfe0c2 Compile set.c with -O3
Proposed by Alexey Tourbin.
2010-11-23 15:59:15 +00:00
7872a77c89 4.0.4-alt100.3
- Rebuilt with liblzma.so.5.
2010-11-17 22:05:17 +00:00
f8528f791c 4.0.4-alt100.2
- pkgconfig.req: pass --print-requires-private to pkg-config.
- find-lang: support manpage paths with more than one symbol after dot
  (closes: #24466).
2010-11-01 22:37:38 +00:00
0d030af93f find-lang (FIND_MAN): support man page paths with more than one symbol after dot (ALT#24466) 2010-11-01 22:36:09 +00:00
2fc9a40da8 pkgconfig.req: pass --print-requires-private to pkg-config 2010-11-01 20:53:06 +00:00
f501d403f0 4.0.4-alt100.1
- Changed release numeration:
  alt99.M51 series is for branch 5.1, alt100 is for Sisyphus (Alexey Tourbin).
- rpmrc: Updated for ARM (Mihail Yakushin).
2010-10-20 09:39:05 +00:00
d5b33ee368 Link rpmmodule.so with librpmio and librpmdb 2010-10-20 09:10:48 +00:00
16213bfa27 Link librpmbuild with librpmio, librpmdb, and libpopt 2010-10-20 09:08:22 +00:00
7c35077bf5 Link librpm with libbeecrypt 2010-10-20 09:04:43 +00:00
Alexey Tourbin
558c99596f lib.req: added missing LC_ALL=C for fgrep 2010-10-12 03:26:25 +04:00
Alexey Tourbin
6a547aefef lib.req, lib.prov: added ENABLE_SET_VERSIONS=1 flag 2010-10-12 03:24:19 +04:00
Alexey Tourbin
2463074998 set.c: corrected set_free() return type 2010-10-12 03:14:10 +04:00
Mihail Yakushin
e9ffe8d263 rpmrc: add armv6l and armv7l, change default arm from armv4l to armv5te 2010-10-06 14:25:09 +00:00
Alexey Tourbin
707fd783cc 4.0.4-alt98.49
- lib.req: Implemented set-versions for soname dependencies.
- build/parseReqs.c: Enabled dependencies on rpmlib(SetVersions).
2010-10-04 03:54:21 +04:00
Alexey Tourbin
34f4788fb2 scripts/functions: invoke av_action with </dev/null 2010-10-04 02:13:53 +04:00
Alexey Tourbin
146732d397 build/reqprov.c: handle set-versions properly 2010-10-04 02:11:25 +04:00
Alexey Tourbin
e1f0ef1fe5 build/parseReqs.c: make dependencies on rpmlib(SetVersions) feature 2010-10-04 01:20:22 +04:00