This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method
> Date: Sat, 15 Sep 2001 00:52:56 -0700
> From: Jason Molenda <jason-swarelist@molenda.com>
>
> 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?