From: Daniel Berlin <dan@cgsoftware.com>
To: Eli Zaretskii <eliz@is.elta.co.il>
Cc: jason-swarelist@molenda.com, gdb-patches@sources.redhat.com
Subject: Re: [RFA] bug in symtab.c:lookup_block_symbol()'s search method
Date: Sat, 15 Sep 2001 08:01:00 -0000 [thread overview]
Message-ID: <87k7z0pkfv.fsf@cgsoftware.com> (raw)
In-Reply-To: <2110-Sat15Sep2001133818+0300-eliz@is.elta.co.il>
"Eli Zaretskii" <eliz@is.elta.co.il> writes:
>> 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?
He would be correct, but only if he can prove that non of the
languages GDB supports, could ever end up calling lookup_block_symbol
(directly or indirectly), or contain symbols, that start with a
character strcmp_iw ignores.
His argument is that if this was true, it would mean a bunch of other
things are broken too.
This is not a good argument, it's quite possible they are broken.
Tons of stuff related to support for more than just C in GDB are
broken, or not in a good state.
It's quite possible I missed removing some other instances of the same
assumption in that routine.
Which, BTW, would slow him down even more.
All i'm asking is that he *prove*, besides using the GDB testsuite
(which isn't a good test here, since it's tests for languages more
than just C are pretty lacking), that his change is correct.
I.E. That such a case would never happen.
This is not easy.
I couldn't do it, which is why i started concentrating on alternate
methods of speeding it up.
His time would be better spent just implementing one of the methods
that doesn't require dealing with this issue at all, then it would
trying to characterize my concern as "vague hand-waving".
I'd estimate it would take him about the same time he's spent arguing
on this mailing list, to implement them. This is based of course, on
how long it took me.
I'd also happily send the patches to him, so he could clean them up
and submit them, or whatever, which would take an absolutely trivial
amount of time.
--Dan
--
"What do batteries run on?
"-Steven Wright
next prev parent reply other threads:[~2001-09-15 8:01 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-09 7:48 Jason Molenda
2001-09-10 11:24 ` Michael Snyder
2001-09-10 11:32 ` Jason Molenda
2001-09-10 11:50 ` Daniel Berlin
2001-09-10 11:52 ` Daniel Berlin
[not found] ` <20010910130347.A5628@shell17.ba.best.com>
2001-09-10 14:17 ` Daniel Berlin
2001-09-14 7:53 ` Andrew Cagney
2001-09-14 8:53 ` Daniel Berlin
2001-09-14 9:06 ` Eli Zaretskii
2001-09-14 9:13 ` Jason Molenda
2001-09-14 9:58 ` Daniel Berlin
2001-09-14 10:55 ` Eli Zaretskii
2001-09-14 10:52 ` Eli Zaretskii
2001-09-14 10:59 ` Daniel Jacobowitz
2001-09-14 11:57 ` Eli Zaretskii
2001-09-15 0:54 ` Jason Molenda
2001-09-15 3:43 ` Eli Zaretskii
2001-09-15 8:01 ` Daniel Berlin [this message]
2001-09-15 9:09 ` Eli Zaretskii
2001-09-15 12:36 ` Daniel Jacobowitz
2001-09-15 12:52 ` Jason Molenda
2001-09-15 7:54 ` Daniel Berlin
2001-09-15 13:08 ` Jason Molenda
2001-09-15 13:33 ` Daniel Berlin
2001-09-15 13:52 ` Daniel Berlin
2001-09-15 14:02 ` Jason Molenda
2001-09-15 14:21 ` Daniel Berlin
2001-09-16 0:15 ` Eli Zaretskii
2001-09-17 22:56 ` Andrew Cagney
2001-09-17 23:12 ` Jason Molenda
2001-09-18 6:21 ` Daniel Berlin
2001-09-18 7:32 ` Andrew Cagney
2001-09-17 23:18 ` Daniel Jacobowitz
2001-09-18 4:51 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k7z0pkfv.fsf@cgsoftware.com \
--to=dan@cgsoftware.com \
--cc=eliz@is.elta.co.il \
--cc=gdb-patches@sources.redhat.com \
--cc=jason-swarelist@molenda.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox