Subject: bug#17284: Host name completion in shell mode take 45 seconds

From: Drew Adams <[email-masked]>
Date: Sat, 4 Apr 2015 14:38:50 -0700 (PDT)

>  > `buffer-substring-no-properties' is defined in C.  I can't tell
>  > whether this is more efficient because of that or less efficient
>  > because it creates a potentially giant string before starting to
>  > compare.  I was trying to compare starting from the far end,
>  > thinking that that might lead to earlier failure detection.
> 
> I got your idea.  But you also said that what we are handling here is
> "typically a short string" ;-)

Yes, and I do expect that that's the typical case.  The question
is whether we want to handle more than this typical case.

To be clear, I don't say we that we need to.  But if we are going
to define this, why not?  That's why I suggested that we might
even want to define it C, like `char-before'.

Whatever others decide about that is fine with me.  The suggestion
is to add such a function, however it might be implemented.