You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many operations that return a new BitString don't alter the underlying data
in any way, often just needing a slice of it. Currently the data is always
copied, which could be rather expensive in some cases.
Suggestion is to improve memory and computational efficiency by allowing a
BitString's internal byte data store to reference another BitString's data
rather than taking a copy.
Original issue reported on code.google.com by python.bitstring@googlemail.com on 17 Jan 2009 at 10:54
The text was updated successfully, but these errors were encountered:
Now that we have the Bits class, I think that in the interests of sane garbage
collection this enhancement should be re-written to just say that copies of Bits
objects shouldn't make unneccesary copies.
>>> a = Bits('0xff')
>>> b = Bits(a)
>>> c = a[:]
>>> d = copy.copy(a)
>>> a._datastore is b._datastore
True
>>> a._datastore is c._datastore
True
>>> a._datastore is d._datastore
True
Original comment by python.bitstring@googlemail.com on 20 Mar 2010 at 8:50
Original issue reported on code.google.com by
python.bitstring@googlemail.com
on 17 Jan 2009 at 10:54The text was updated successfully, but these errors were encountered: