<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt/apt-pkg/pkgcache.cc, branch 2.1.19</title>
<subtitle>Debians commandline package manager</subtitle>
<id>https://git.kalnischkies.de/apt/atom?h=2.1.19</id>
<link rel='self' href='https://git.kalnischkies.de/apt/atom?h=2.1.19'/>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/'/>
<updated>2021-02-03T16:36:45Z</updated>
<entry>
<title>Free XXH3 state to avoid leak in cache hashing</title>
<updated>2021-02-03T16:36:45Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2021-02-03T09:55:09Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=cd1f75854824b3db7ba86039463528f834a0838a'/>
<id>urn:sha1:cd1f75854824b3db7ba86039463528f834a0838a</id>
<content type='text'>
We do this once (usually), so the leak is tremendously big, but it is
detected as a leak by the fuzzer and trips it up.
</content>
</entry>
<entry>
<title>Unroll pkgCache::sHash 8 time, break up dependency</title>
<updated>2020-12-15T21:13:12Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-15T19:57:32Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=c6d40932f81edc656bbcc8dbd9d277aba543bc5b'/>
<id>urn:sha1:c6d40932f81edc656bbcc8dbd9d277aba543bc5b</id>
<content type='text'>
Unroll pkgCache::sHash 8 times and break up the dependency between
the iterations by expanding the calculation
    H(n) = 33 * H(n-1) + c
8 times rather than performing it 8 times. This seems to yield about
a 0.4% performance improvement.

I tried unrolling 4 and 2 bytes as well, those only having 3 ifs at
the end rather than 1 small loop; but that was actually slower -
potentially the code got to large and the cache went bonkers.

I also tried unrolling 4 times instead of 8, thinking that smaller
code might yield better results overall then, but that was slower as
well.
</content>
</entry>
<entry>
<title>Use XXH3 for cache, hash table hashing</title>
<updated>2020-12-15T12:47:22Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-13T20:07:03Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=1460eebf2abe913df964e031eff081a57f043697'/>
<id>urn:sha1:1460eebf2abe913df964e031eff081a57f043697</id>
<content type='text'>
XXH3 is faster than both our CRC32c implementation as well
as DJB hash for hash table hashing, so meh, let's switch to
it.
</content>
</entry>
<entry>
<title>Raise APT::Cache-HashtableSize to 196613</title>
<updated>2020-12-10T14:40:08Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-12-08T10:52:26Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=07808e0d08e8e95e06b754f4c37665015b1045a7'/>
<id>urn:sha1:07808e0d08e8e95e06b754f4c37665015b1045a7</id>
<content type='text'>
We now have over 100k package names, my Ubuntu system has 125k
arleady, so increase the hash table size to match, this will cost
us about a MB in cache size, but give a very nice speed up somewhere
around 3%-4% or so.
</content>
</entry>
<entry>
<title>Allow FMV SSE4.2 detection to succeed on clang</title>
<updated>2020-05-25T10:05:00Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2020-05-21T20:17:42Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=574249cd721a3cdbb79b6e457384a55827856b6a'/>
<id>urn:sha1:574249cd721a3cdbb79b6e457384a55827856b6a</id>
<content type='text'>
As the builtins were used in the feature test also in the default branch
clang fails to compile the test helpfully complaining that you need to
compile with sse4.2 to use that while on gcc it is optimized out as
unused code and produces only a warning for that… removing the code from
the default branch fixes this problem, but we adapt the code some more to
avoid compilers optimizing it out in the future just in case.
</content>
</entry>
<entry>
<title>Make map_pointer&lt;T&gt; typesafe</title>
<updated>2020-02-24T17:29:07Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-02-24T16:46:10Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=4fad7262291a8af1415fb9a3693678bd9610f0d6'/>
<id>urn:sha1:4fad7262291a8af1415fb9a3693678bd9610f0d6</id>
<content type='text'>
Instead of just using uint32_t, which would allow you to
assign e.g. a map_pointer&lt;Version&gt; to a map_pointer&lt;Package&gt;,
use our own smarter struct that has strict type checking.

We allow creating a map_pointer from a nullptr, and we allow
comparing map_pointer to nullptr, which also deals with comparisons
against 0 which are often used, as 0 will be implictly converted
to nullptr.
</content>
</entry>
<entry>
<title>pkgcache.cc: Mix PACKAGE_VERSION into the cache hash</title>
<updated>2020-01-16T17:21:20Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-16T17:19:34Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=25353dc6646e5b9fff55059a5c85183589cf472d'/>
<id>urn:sha1:25353dc6646e5b9fff55059a5c85183589cf472d</id>
<content type='text'>
This ensures that caches build with one version can't be
opened with another, which makes sense. It's a temporary
approach until we can replace major:minor fields with
a version string.

For example, this would have prevented 1.9.7 from using
broken caches from 1.9.6.
</content>
</entry>
<entry>
<title>Rename _count() macro to APT_ARRAY_SIZE()</title>
<updated>2020-01-07T21:51:41Z</updated>
<author>
<name>Julian Andres Klode</name>
<email>julian.klode@canonical.com</email>
</author>
<published>2020-01-07T21:37:36Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=df4b92bd1df204e7fb0d22e73e143d205d74aea6'/>
<id>urn:sha1:df4b92bd1df204e7fb0d22e73e143d205d74aea6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Search in all available description translations</title>
<updated>2019-11-25T09:59:38Z</updated>
<author>
<name>Алексей Шилин</name>
<email>rootlexx@mail.ru</email>
</author>
<published>2019-11-25T09:59:38Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=19033186919b9c6d31ca3aabaacfb069a4b64f88'/>
<id>urn:sha1:19033186919b9c6d31ca3aabaacfb069a4b64f88</id>
<content type='text'>
When multiple translations of package descriptions are available,
perform search in all of them. It allows using search patterns in
any of the configured languages.

Previously, only the first available translation was searched. As
the result, patterns in e.g. English never matched packages which
had their descriptions translated into local language.

Closes: #490000
</content>
</entry>
<entry>
<title>Fix typos reported by codespell in code comments</title>
<updated>2019-07-10T14:15:30Z</updated>
<author>
<name>David Kalnischkies</name>
<email>david@kalnischkies.de</email>
</author>
<published>2019-07-10T14:15:30Z</published>
<link rel='alternate' type='text/html' href='https://git.kalnischkies.de/apt/commit/?id=5cfbc5727dba2f4662d24cf4deb7cab7cdd57c14'/>
<id>urn:sha1:5cfbc5727dba2f4662d24cf4deb7cab7cdd57c14</id>
<content type='text'>
Also in old changelogs, but nothing really user visible
like error messages or alike so barely noteworthy.

Reported-By: codespell
Gbp-Dch: Ignore
</content>
</entry>
</feed>
