This is the mail archive of the
cygwin-patches@cygwin.com
mailing list for the Cygwin project.
Re: speed up the function 'find_exec' a bit
- From: Christopher Faylor <cgf-no-personal-reply-please at cygwin dot com>
- To: cygwin-patches at cygwin dot com
- Date: Wed, 2 Jun 2004 17:21:40 -0400
- Subject: Re: speed up the function 'find_exec' a bit
- References: <00ae01c448e3$38784a40$bb583351@jaillet>
- Reply-to: cygwin-patches at cygwin dot com
On Wed, Jun 02, 2004 at 10:50:19PM +0200, Christophe Jaillet wrote:
>Here is a small patch to speed up the function 'find_exec' a bit
>At the top of the function we have :
>
> bool has_slash = strchr (name, '/');
>
>So there is no need to compute it again a few line latter.
>
>
>ChangeLog entry
>===============
>2004-06-02 Christophe Jaillet <christophe.jaillet@wanadoo.fr>
>
> * spawn.cc: function 'find_exec'. Don't compute >>strchr (name, '/')<<
>twice
Applied with some stylistic changes and a new ChangeLog entry.
Thanks.
cgf