From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Date: Sun, 5 Dec 2010 03:21:15 +0300 From: Alexey Tourbin To: ALT Devel discussion list Message-ID: <20101205002114.GC25886@altlinux.org> References: <20101204150618.GA15470@altlinux.org> <20101204162911.GA12275@altlinux.org> <20101204164239.GC15470@altlinux.org> <20101204165244.GA31801@altlinux.org> <20101204170557.GE15470@altlinux.org> <20101204175200.GC31801@altlinux.org> <20101204212831.GA25886@altlinux.org> <20101204232644.GA30257@altlinux.org> <20101204234126.GB25886@altlinux.org> <20101205000316.GA5836@altlinux.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20101205000316.GA5836@altlinux.org> Subject: Re: [devel] [PATCH 0/3] optimize rpmsetcmp() X-BeenThere: devel@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: ALT Linux Team development discussions List-Id: ALT Linux Team development discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 05 Dec 2010 00:21:15 -0000 Archived-At: List-Archive: List-Post: 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 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.