[devel] [PATCH 0/3] optimize rpmsetcmp()
Alexey Tourbin
at на altlinux.ru
Вс Дек 5 00:21:15 UTC 2010
On Sun, Dec 05, 2010 at 03:03:16AM +0300, Dmitry V. Levin wrote:
> > > apt-rpm indeed calls rpmRangesOverlap() too many times, it's common
> > > knowledge. Unfortunately, stating this fact isn't sufficient to make
> > > apt-rpm work faster.
> >
> > So what do you think? There's a possibility to change bitv[] to bitmap,
> > per Kirill's proposal. That mighit yield about, say 30% user time cutdown.
>
> 30% is a bit optimistic, according to my measurements.
>
> > However, note that apt is not only eager for user time. System time is
> > being spent with splendor as well.
>
> System time takes only about 15% of elapsed time, according to my
> measurements.
Under VirtualBox, which seems to become a common hardware nowadays,
system time is somewhat more noticable.
> > Personally, I like bitv[], and I don't like something like <sys/select.h> stuff.
>
> When performance is the issue, there should be a good rationale to choose
> the approach that works slower.
There are other reasons, such as keeping the code comprehensible (at the
expense of some runtime penalties). I think the concept of bitv[] is
crucial for understanding the code, and it helps to keep the code clean
and self-evident. Replacing bitv[] with bitmap might be a major trade-off
for the sake of performance. Or might not.
Подробная информация о списке рассылки Devel