Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Andrew Cagney <ac131313@cygnus.com>
To: Daniel Berlin <dberlin@redhat.com>
Cc: gdb-patches@sources.redhat.com
Subject: Re: [PATCH] Make completions almost instantaneous
Date: Fri, 30 Mar 2001 15:50:00 -0000	[thread overview]
Message-ID: <3AC51BB6.93AF768B@cygnus.com> (raw)
In-Reply-To: <Pine.LNX.4.33.0103300144290.20894-100000@www.cgsoftware.com>

Daniel Berlin wrote:

> -   /* Clip any symbol names that we've already considered.  (This is a
> -      time optimization)  */
> -
> -   for (i = 0; i < return_val_index; ++i)
> -     {
> -       if (STREQ (symname, return_val[i]))
> -       {
> -         return;
> -       }
> -     }
> -

It probably should have said ``space optimization''.  I'd take a guess
that this dates back to a time when readline didn't remove duplicates
and when people were more worried about memory.

I suspect that someone might eventually re-tweek the code so that it
does an O(log(n)) sorted insertion and that way eliminates duplicates. 
However, given that Eli (i.e. dos) is happy with change, I don't see
that happening soon.

As Elena said, nice catch.

	Andrew


  parent reply	other threads:[~2001-03-30 15:50 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-30  1:09 Daniel Berlin
2001-03-30  7:21 ` Eli Zaretskii
2001-03-30  8:42   ` Daniel Berlin
2001-03-30 13:46 ` Elena Zannoni
2001-03-31 11:03   ` Daniel Berlin
     [not found]     ` <15047.34162.692296.724782@kwikemart.cygnus.com>
2001-04-01 13:57       ` Daniel Berlin
2001-03-30 15:50 ` Andrew Cagney [this message]
2001-03-30 20:55   ` Daniel Berlin

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=3AC51BB6.93AF768B@cygnus.com \
    --to=ac131313@cygnus.com \
    --cc=dberlin@redhat.com \
    --cc=gdb-patches@sources.redhat.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