By using atomics instead of a mutex the benchmark took overhead is decreased a little. I saw slightly better results using atomics. The difference may have been within statistical errors though. The first attempt with the change was 15% faster but subsequence runs were similar to with mutex. Anyway, fewer lines of code if you care.
By using atomics instead of a mutex the benchmark took overhead is decreased a little. I saw slightly better results using atomics. The difference may have been within statistical errors though. The first attempt with the change was 15% faster but subsequence runs were similar to with mutex. Anyway, fewer lines of code if you care.