StaticTuple... naming, maintenance, ...

John Arbash Meinel john at arbash-meinel.com
Wed Oct 7 03:29:47 BST 2009


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


...

>> 3) C/Cython/Pyrex
...

>>
>>    In the end, I wrote "StaticTuple" in C, and "StaticTupleInterner" in
>>    Cython, and the latter took a day, and the former took a week. It is
>>    a "sunk cost", but ongoing maintenance is not.
>>
>>    The main issue here is that Pyrex will not generate objects without
>>    the HAVE_GC flag set. Cython >= 0.11 can (as long as you don't have
>>    'object' attributes, which is true here, because I have to use
>>    PyObject** because neither Pyrex nor Cython support C arrays of
>>    objects)
>>
...

> I guess we could start checking in and shipping the C files, though
> people have identified that this would cause some considerable churn,
> and perhaps there were other problems.
> 
> I'd be reluctant to add such a high dependency, but if you really want
> it I don't think we should block it.  The dirstate code shows me we
> should bias the dependencies/speed/clarity tripod more towards speed
> and clarity.

So in the end it turns out not to matter. You can't do __new__ tricks
with Pyrex or Cython. So I can't make "StaticTuple()" a singleton or
allocate variable width structs to have inline storage.

It took me a while to sort things out to understand this, but hopefully
tomorrow I'll clean up my implementation and have something for submission.

John
=:->

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

iEYEARECAAYFAkrL/RsACgkQJdeBCYSNAAPRQQCgrwkQBJGgSdcDLRmLu/BVohtt
vosAnjji905Sx5QZ32KHkzO4N9WqESIO
=OEpA
-----END PGP SIGNATURE-----



More information about the bazaar mailing list