Correctly my example code by declaring position volatile in each approach function. Without this modification loads and stores to position get optimized out.
Correcting minor mistake.
Added a third bit position approach and created a script for making sparse vectors.
Whoops I accidentally committed the binary.
Adding bit position test program used to benchmark various approaches and a couple of support scripts.