Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Scala mutable BitSet, where are the mutating operations?

I'm trying to add two BitSet objects together (mutating one of them). This should be an efficient operation for bitsets. But it seems that the only operation that does this is ++=. Looking at the source, this doesn't seem to treat adding bitset differently.

Is it true, that in Scala 2.9.1, there are no efficient logical update operations on mutable bitsets defined? That's rather pointless, isn't it?

like image 730
ziggystar Avatar asked Feb 22 '12 11:02

ziggystar


1 Answers

Responding to the comments I've filed an enhancement request.

Since I'm answering my own question (which doesn't have a positive answer) I'll just add some links to Bitset implementations I stumbled across. Currently I'm using the Java BitSet, but there seem to be more efficient alternatives:

  • compressed bitset implementation
  • OpenBitSet, more implementation than Java's
like image 89
ziggystar Avatar answered Oct 16 '22 16:10

ziggystar