[MERGE] Relocate iter_changes' process_entry method to allow C optimisation.

John Arbash Meinel john at arbash-meinel.com
Wed Sep 17 02:42:34 BST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Robert Collins wrote:
> This is a simple relocation of an inner method into a class-with-state
> that can be later C optimised.
> 
> No specific tests for it, but its a private method and fully tested via
> the iter_changes logic.
> 
> -Rob
> 

I didn't look closely, as I assume this is primarily just a
cut-and-paste change. If it isn't, let me know and I'll look closer.

Is there a reason you don't pass: (source_index, target_index, state) in
as state to the constructor rather than in each call?

They don't change, and it makes for prettier code. (Not to mention that
it is a 1-time conversion to a real integer, and then you don't have to
keep dealing with PyInt (though I imagine that is pretty fast.)

BB:tweak

John
=:->
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (Cygwin)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iEYEARECAAYFAkjQYIoACgkQJdeBCYSNAANV+ACfQ/LRgmsbViBdmjBpIn3FM3vN
gXQAoI59Xdj1HW2p21ggYglNkc1uevcu
=3/q5
-----END PGP SIGNATURE-----



More information about the bazaar mailing list