Re: [PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Bruno Haible
Ralf Wildenhues wrote: > * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): New field edit_count_limit. > (CHECK_CONDITION): New define; check if the bound has been reached. > (fstrcmp_internal): New argument 'bound', used to compute > edit_count_limit. Return zero if the limit has been reached. > ctxt.e

Re: [PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Bruno Haible
Hi Ralf, Both of your optimization ideas are excellent. A 4x speedup for msgmerge is not something that I'm seeing every day!! Let me start by committing the diffseq.h change. I'm changing the macro to not include the 'return' statement, just the condition expression. And when the condition has e

[PATCH] Implement premature termination of compareseq.

2008-09-14 Thread Ralf Wildenhues
* lib/diffseq.h (CHECK_CONDITION): New required define; may be empty. (compareseq): Use it after each note, and recursive compareseq invocation. * lib/fstrcmp.c (EXTRA_CONTEXT_FIELDS): New field edit_count_limit. (CHECK_CONDITION): New define; check if the bound has been reached. (fstrcmp_internal)