From: George Papanikolaou Date: Thu, 20 Mar 2014 10:58:12 GMT Subject: Re: [PATCH] builtin/apply.c: fuzzy_matchlines:trying to fix some inefficiencies Message-ID: In-Reply-To: <532ABBE1.4090001@alum.mit.edu> Hi, Thanks for the feedback, On Thu, Mar 20, 2014 at 11:58 AM, Michael Haggerty 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/