diff options
| author | Julian Andres Klode <jak@debian.org> | 2026-01-31 22:33:40 +0100 |
|---|---|---|
| committer | Julian Andres Klode <jak@debian.org> | 2026-02-10 19:59:03 +0000 |
| commit | 7d84e1f830727ca5008566113e7dfd35df049bd6 (patch) | |
| tree | 28eb3a384bb7019bce5a5f7d5f9a196991b4dac1 /methods | |
| parent | 7d5ec84c13227290cfb1bb83d27ae354200bcb02 (diff) | |
solver3: Fix off-by-one missing optimization
We were trying to compare the dependencies in the first version
with the dependencies in later version, but our loop started
at the first version as well due to an oversight in the use
of the increment operator.
Change the increment from postfix to prefix such that we start
iterating with the 2nd version in the list only.
This should yield minute performance optimizations:
before:
12: 17.80% 0.00% apt libapt-pkg.so.7.0.0 [.] EDSP::ResolveExternal(char const*, pkgDepCache&, unsigned int, OpProgress*)
14: --17.80%--EDSP::ResolveExternal(char const*, pkgDepCache&, unsigned int, OpProgress*)
20: | | |--6.34%--APT::Solver::DependencySolver::RegisterCommonDependencies(pkgCache::PkgIterator)
44: | | --0.85%--APT::Solver::DependencySolver::RegisterCommonDependencies(pkgCache::PkgIterator)
after:
12: 16.98% 0.00% apt libapt-pkg.so.7.0.0 [.] EDSP::ResolveExternal(char const*, pkgDepCache&, unsigned int, OpProgress*)
14: --16.98%--EDSP::ResolveExternal(char const*, pkgDepCache&, unsigned int, OpProgress*)
20: | | |--5.65%--APT::Solver::DependencySolver::RegisterCommonDependencies(pkgCache::PkgIterator)
42: | | --0.70%--APT::Solver::DependencySolver::RegisterCommonDependencies(pkgCache::PkgIterator)
Diffstat (limited to 'methods')
0 files changed, 0 insertions, 0 deletions
