From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Eli Zaretskii" To: jason-swarelist@molenda.com Cc: gdb-patches@sources.redhat.com Subject: Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method Date: Sat, 15 Sep 2001 03:43:00 -0000 Message-id: <2110-Sat15Sep2001133818+0300-eliz@is.elta.co.il> References: <20010909074800.A8112@shell17.ba.best.com> <3B9D054A.4C3CC2B1@cygnus.com> <20010910113226.A23487@shell17.ba.best.com> <87zo82swwa.fsf@cgsoftware.com> <20010910130347.A5628@shell17.ba.best.com> <8766aq7nki.fsf@cgsoftware.com> <3BA219EF.3000300@cygnus.com> <9003-Fri14Sep2001190223+0300-eliz@is.elta.co.il> <20010914091241.A28921@shell17.ba.best.com> <1659-Fri14Sep2001204927+0300-eliz@is.elta.co.il> <20010915005255.A2369@shell17.ba.best.com> X-SW-Source: 2001-09/msg00189.html > Date: Sat, 15 Sep 2001 00:52:56 -0700 > From: Jason Molenda > > With the gdb 5.1 symtab.c, typing "p aWindowPtr" in SimpleText will > take 3.5 seconds to complete (as reported by 'maint time 1'). > > With the patches (or with gdb 5.0), typing "p aWindowPtr" in > SimpleText takes between 0.01 and 0.00 seconds (as reported by > 'maint time 1' -- it's at the limits of maint time's granularity. > Hence my earlier characterization as "unmeasurable".) [...] > Dan's patch dropped the "exits out of linear search" -- now it > binary searches to the beginning of plausible ranges, and steps > through to the end of the block. It's now an O(1/2*N) algorithm > for worst-case, i.e. non-matches. Are you saying that Dan's change was a gratuitous one, i.e. there was no reason whatsoever to make that change?