Added benchmarks for all methods (focused on comparing implementations).

I was hoping that eventually I could optimize the thread-safe implementation enough that it performed almost as well as the thread-unsafe one, and that the thread-unsafe implementation could thus be removed. I wrote these benchmarks with that goal in mind. The current implementation is not fast enough (in many cases as much as 33% slower), but the benchmarks may be useful regardless.