Re: [PATCH] builtin/apply.c: fuzzy_matchlines:trying to fix some inefficiencies
- From
George Papanikolaou <g3orge.app@gmail.com>
- Date
- Mar 20, 2014, 10:58 UTC
- Message-ID
- <CAByyCQAsjoBiv54PR+AP=2ci60o39TNw5FhM0aNOhzbZpLd7gg@mail.gmail.com>
- In-Reply-To
- <532ABBE1.4090001@alum.mit.edu>
Hi, Thanks for the feedback,
On Thu, Mar 20, 2014 at 11:58 AM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 5 quoted lines
> > 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
Show 6 quoted 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/