|
|
|
|
|
|
|
|
volatile int bit_count;
-- the compiler is not allowed to optimize out any read or write accesses to volatile objects. With that change, on my system, commenting out LINE2 makes no difference whatsoever (the loop iteration takes about 22 nanoseconds either way), but commenting out LINE1 makes the loop run noticably faster (takes about 19 nanoseconds per iteration)
bit_count=(int) c.count();
vec[i]=bit_count;