kutsurak / python-bitstring

Automatically exported from code.google.com/p/python-bitstring
0 stars 0 forks source link

Intern strategy for Bits creation. #77

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The immutable Bits class gives us opportunities to save on creating and
storing new Bits objects with the same data as existing Bits.

Note that we can't use the same Bits, as there is the bit position to
consider, so really it's interning the _datastore.

Obvious ones would be to have a True and False _datastore at the module level.

Another possibility is to memoise the strings used to initialise (to auto,
bin, oct, hex, but maybe not bytes).

Original issue reported on code.google.com by python.bitstring@googlemail.com on 25 Jan 2010 at 5:56

GoogleCodeExporter commented 9 years ago

Original comment by python.bitstring@googlemail.com on 15 Mar 2010 at 8:09

GoogleCodeExporter commented 9 years ago

Original comment by python.bitstring@googlemail.com on 19 Mar 2010 at 11:11

GoogleCodeExporter commented 9 years ago

Original comment by dr.scott...@gmail.com on 23 May 2010 at 11:00

GoogleCodeExporter commented 9 years ago

Original comment by dr.scott...@gmail.com on 22 Jan 2011 at 9:39

GoogleCodeExporter commented 9 years ago
Done in 2.2.

Original comment by dr.scott...@gmail.com on 18 Jun 2011 at 6:13