From: Marat Radchenko Date: Sat, 27 Aug 2011 08:50:31 GMT Subject: Re: [PATCH v2] xdiff/xprepare: improve O(n*m) performance in xdl_cleanup_records() Message-ID: <1314435031.9095.2.camel@n900.home.ru> In-Reply-To: <1313546037-4104-1-git-send-email-rctay89@gmail.com> On ср 17 авг 2011 05:53:57 MSD, Tay Ray Chuan wrote: > In xdl_cleanup_records(), we see O(n*m) performance, where n is the > number of records from xdf->dstart to xdf->dend, and m is the size of a > bucket in xdf->rhash (<= by mlim). > > Here, we improve this to O(n) by pre-computing nm (in rcrec->len(1|2)) > in xdl_classify_record(). Thanks for your patch, btw, now diff is much faster