A benchmark to compare synchronization techniques for multicore programming