Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-22 Thread Bruno Haible
Hello Ralf, Ralf Wildenhues wrote: > BTW, I now found a newer paper that has some more interesting stuff, if > a bit overkill for msgmerge: . > Also, there is this good overview of algorithms: > .

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-21 Thread Paolo Bonzini
> But the compiler does not know that fstrcmp is called millions of time and > that this piece of code needs to be optimized for speed rather than for space. If doing profile-directed optimization, it does know. In this case, it will even inline five or six recursive calls, as in if (n >= 2)

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-20 Thread Ralf Wildenhues
Hi Bruno, Thanks for your reply. * Bruno Haible wrote on Sat, Sep 20, 2008 at 04:20:02PM CEST: > > > It is all committed now. > > > > Thanks. Some change between then and now caused differences in the > > coreutils po files, though. > > Yes, this is intentional. OK, good to know. I was afrai

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-20 Thread Bruno Haible
Hi Ralf, > > It is all committed now. > > Thanks. Some change between then and now caused differences in the > coreutils po files, though. Yes, this is intentional. In the draft patch, I had special code to guarantee backward compatibility, namely in case of ambiguity, to choose the string with

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-19 Thread Ralf Wildenhues
Hi Bruno, * Bruno Haible wrote on Tue, Sep 16, 2008 at 03:28:51AM CEST: > > > Your draft patch doesn't directly apply to the current CVS > > tree; I haven't tested and looked at it in detail yet. > > It is all committed now. Thanks. Some change between then and now caused differences in the co

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-15 Thread Bruno Haible
Hi Ralf, > Your draft patch doesn't directly apply to the current CVS > tree; I haven't tested and looked at it in detail yet. It is all committed now. > See below for a character frequency bound that is only a little more > expensive than string length comparison (sort of a 1-gram version of >

Re: msgmerge speedup: fstrcmp and diffseq improvements

2008-09-15 Thread Ralf Wildenhues
Hi Bruno, Thanks for the nice feedback, and for promptly addressing my patches! Your changes to them all looked good to me. * Bruno Haible wrote on Mon, Sep 15, 2008 at 01:50:52AM CEST: > > > 3) When computing one string pair distance, avoid computing the path > > (i.e., the edit script). > > W

msgmerge speedup: fstrcmp and diffseq improvements

2008-09-14 Thread Ralf Wildenhues
Hello Bruno, all, msgmerge is slow: merging of outdated coreutils .po files takes roughly 12 minutes here. gcov shows that more than 99% of the time is spent in compareseq/diag, called from fstrcmp, called indirectly from message_list_search_fuzzy. At the heart of the fstrcmp code, a modified sc