storm icon indicating copy to clipboard operation
storm copied to clipboard

BitVector reallocation

Open sjunges opened this issue 3 years ago • 1 comments

Bitvector assignments sometimes require reallocations. This is currently done very conservatively, see a discussion in https://github.com/moves-rwth/storm/pull/189.

Before we invest time here, it would be good to understand to what extend this currently is used. The fact that the bug from https://github.com/moves-rwth/storm/pull/189 (albeit slightly different situation) was not encountered earlier may hint that this is premature.

sjunges avatar Feb 07 '22 10:02 sjunges

I agree that copy assignment with a different size is not very common. However, BitVector::resize and BitVector::grow are used a bit more often and those also use naive reallocations.

Still, I don't think we should revise our BitVector just because of that (unless there is some evidence that reallocations are indeed significant). There are just too many chances of introducing subtile errors ;)

On a slightly related note: If we at some point decide to improve the BitVector performance, this could be a good way to make a faster iterator.

tquatmann avatar Feb 07 '22 13:02 tquatmann