Re: [PATCH] builtin/apply.c: fuzzy_matchlines:trying to fix some inefficiencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,
Thanks for the feedback,

On Thu, Mar 20, 2014 at 11:58 AM, Michael Haggerty <mhagger@xxxxxxxxxxxx> wrote:
>
> Why is this an improvement?  Do you expect this function to be called
> often for empty lines (as opposed, for example, to lines consisting
> solely of whitespace characters)?
>

Yes, you are probably right, we are not gonna get much (if any)
completely empty lines

>
> The comment just above this change gives a justification for putting an
> "if" statement surrounding the "while" statements.  Do you think the
> comment's argument is incorrect?  If so, please explain why, and remove
> or change the comment.
>

I see what I did wrong. I thought since that the if-condition is double checked
(from the while clause) so I removed it.

Also this lead me to see that since the while clause is now unconditioned, there
is no point of it being replicated exactly the same above, so I
removed that too. =(

I'm trying to find other inefficiencies/irregularities on that
function. I'm currently
thinking on merging the first checks with a call to iswspace() or
something similar.

Also thanks for clarifying the way patches/mails work.

Cheers.

---
papanikge's surrogate email.
I may reply back.
http://www.5slingshots.com/
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]