~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/_simple_set_pyx.pyx

  • Committer: John Arbash Meinel
  • Date: 2009-10-08 15:51:34 UTC
  • mfrom: (4679.7.1 2.1-static-tuple-btree)
  • mto: This revision was merged to the branch mainline in revision 4749.
  • Revision ID: john@arbash-meinel.com-20091008155134-2in91irsp62rcgei
Merge in the 2.1-static-tuple-btree branch, and restore the string intern tweaks.

The tweaks basically involve not interning 'sha1:' chk strings, which we can
be reasonably confident are only accessed as tuples, and thus get interned
into the more efficient SimpleSet. Even further, we know that we won't be
combining them into larger tuples [like we do with (file_id, revision_id)].
This saves quite a bit of space in the string interned dict, since chk
keys actually make up the bulk of our keys.

Show diffs side-by-side

added added

removed removed

Lines of Context:
38
38
    void PyMem_Free(void *)
39
39
    void memset(void *, int, size_t)
40
40
 
 
41
 
41
42
cdef object _dummy_obj
42
43
cdef PyObject *_dummy
43
44
_dummy_obj = object()