Using fixed variables probably doesn't help
John Arbash Meinel
john at arbash-meinel.com
Fri Jun 16 15:26:46 BST 2006
-----BEGIN PGP SIGNED MESSAGE-----
Robert Collins wrote:
> On Fri, 2006-06-16 at 09:05 -0500, John Arbash Meinel wrote:
>> As far as I know we don't. And if you do socket, do you also do fifo,
>> chardev, and block? They just don't seem very useful to me. I would
>> promote unknown_kind = 'unknown', especially since you'll want to use
>> that in your 'read_dirs' changes. (Can you call intern() in pyrex to
>> make sure that you are using the interned version?)
> I'm pretty sure we access all the kinds in several places to give them
> the fancy output symbols and the like.
Nope, the 'kind_marker' only supports the 3 versioned file kinds.
> pyrex generates a single table of all the strings used in its code, and
> references them at runtime, so its not the python intern table, but it
> is the same string instance always.
Sure, but that means it won't be the same string that everyone else
uses. So you lose the fast lookups. My point was to have the returned
strings be interned, so when 'walkdirs()' says 'if kind == 'unknown'
then stat' it doesn't have to be a string comparison.
In my testing it was only about 10% faster, but it was faster.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v18.104.22.168 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-----END PGP SIGNATURE-----
More information about the bazaar