Exmaple demonstrates using bitvectors with different initial block allocation strategy.Bitvector 1 (bv1) by default working without RLE compression option (best performance, maximum memory consumption). Bitvector 2 (bv2) will be working in compression mode and use less memory.
- See also
- bm::bvector<>::set_new_blocks_strat()
For more information please visit: http://bmagic.sourceforge.net
#include <stdlib.h>
#include <iostream>
using namespace std;
static
{
{
if (rand() % 2500)
{
}
}
}
static
{
cout <<
"Bits count:" << bv.
count() << endl;
}
{
try
{
}
catch(std::exception& ex)
{
std::cerr << ex.what() << std::endl;
}
return 0;
}
void optimize(bm::word_t *temp_block=0, optmode opt_mode=opt_compress, statistics *stat=0)
Optimize memory bitvector's memory allocation.