[RFC] C implementation of PatienceSequenceMatcher

Lukáš Lalinský lalinsky at gmail.com
Mon Jul 23 07:42:46 BST 2007


On Ne, 2007-07-22 at 10:12 -0500, John Arbash Meinel wrote:

> I think it has a bit more effect than you are giving credit for. And as we
> improve other places, it will be even bigger.
> 
> Specifically:
> 
> bzr commit drops from 4s to 3s. Which is pretty darn good.
> bzr diff drops from 1m56s to 55s, 2x as fast.

Well, it's not that good if you look at the diff sizes. Usually, you
will have max. 10 changed files and in cases like this are the times
less interesting.

> My feelings on this:
> 
> 1) You've already written the code, and hopefully it is well tested. You may
> not have hooked into it already, but you can use some of my tricks to have the
> PatienceDiff test suite run against both the python implementation and the C
> implementation.

Yes, I've already done this. 

> 3) We generally have chosen to use Pyrex for extensions, in the hope that it
> might be more maintainable. (As some of the code can be written in a more
> 'pythonic' fashion. Certainly it is more obvious to use classes, etc).
> However, if this is a fairly clean C implementation, I don't think we would
> have any reason not to use it.

I started this as a non-Python code. I thought about porting it to Pyrex
when I was writing the Python extension, but decided to not do it
because I felt I can do it faster and cleaner in plain C. Pyrex would be
for me just one more language to learn, with all it's limits and
workarounds for them.

I'll send the final version for review later this week.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Toto je =?ISO-8859-1?Q?digit=E1lne?=
	=?ISO-8859-1?Q?_podp=EDsan=E1?= =?UTF-8?Q?_=C4=8Das=C5=A5?=
	=?ISO-8859-1?Q?_spr=E1vy?=
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20070723/0c64792e/attachment.pgp 


More information about the bazaar mailing list