IF YOU WOULD LIKE TO GET AN ACCOUNT, please write an
email to Administrator. User accounts are meant only to access repo
and report issues and/or generate pull requests.
This is a purpose-specific Git hosting for
BaseALT
projects. Thank you for your understanding!
Только зарегистрированные пользователи имеют доступ к сервису!
Для получения аккаунта, обратитесь к администратору.
When addFile() is called with file path obtained from specfile,
various checks must be performed, so that only valid paths can
enter the package. However, when a path is passed down to fts,
it is no longer possible to obtain ill-formed paths. So a lot
of lstat calls for intermediate path components can be saved.
This introduces new macro %_configure_platform which will normally
expand to %_target_platform. However, for noarch packages, a special
version called %_configure_platform_noarch will be used, which will use
%_host_cpu instead of mock "noarch" cpu. Suggested by Dmitry V. Levin.
This fixes %configure failures like
checking build system type... Invalid configuration `noarch-alt-linux': machine `noarch-alt' not recognized
Pushing new elements to the front tends to assign extra weight to that
elements, at the expense of other elements that are already in the cache.
The idea is then to try first-time insertion somewhere in the middle.
Further attempts suggest that the "pivot" should be closer to the end.
Cache performance for "apt-shell <<<unmet", previous commit:
hit=62375 miss=17252
Cache performance for "apt-shell <<<unmet", this commit:
hit=65085 miss=14542
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
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.
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>