Re: comparing two lists, ndiff performance

2008-01-30 Thread Gabriel Genellina
On 29 ene, 22:47, Zbigniew Braniecki <[EMAIL PROTECTED]> wrote: > The new one is of course much better and cleaner (the old one is > bloated), but I'm wondering if there is a faster way to compare two > lists and find out what was added, what was removed, what was changed. > I can simply iterate t

Re: comparing two lists, ndiff performance

2008-01-30 Thread Zbigniew Braniecki
[EMAIL PROTECTED] wrote: > Zbigniew Braniecki: >> Is there a way to speed it up? Any easier way? Faster method? > > This problem is a bit messy. Maybe it's better to sidestep the > problem, and not use a list, and create an object that wraps the list, > so it always keeps an updated record of what

Re: comparing two lists, ndiff performance

2008-01-30 Thread bearophileHUGS
Zbigniew Braniecki: > Is there a way to speed it up? Any easier way? Faster method? This problem is a bit messy. Maybe it's better to sidestep the problem, and not use a list, and create an object that wraps the list, so it always keeps an updated record of what changes are done... but you have to

comparing two lists, ndiff performance

2008-01-29 Thread Zbigniew Braniecki
Hi all. I'm working on a tool for localizers. I have two Lists with Entities/Strings/Comments (each L10n file is built of those three elements). So I have sth like: l10nObject = [] l10nObject.append(Comment('foo')) l10nObject.append("string") l10nObject.append(Entity('name', 'value')) etc. I