koepkeca / goSafeDataStruct

A small collection of thread-safe golang data structure libraries.
MIT License
2 stars 0 forks source link

Comparision to using sync.Mutex.Lock() #1

Open notzippy opened 7 years ago

notzippy commented 7 years ago

Your implementation is a nice form of using channels, I tried a similar implementation using a linked list and sync.Mutex to control access to the list, with my test results it showed using channels is slower then locking. I am curious if you would get the similar results, can you try an implementation of a stack using sync.Mutex and see how your benchmarks perform ?

koepkeca commented 7 years ago

Thanks for the feedback, I originally intended for this version to be more "readable" than optimized, however, you bring up a great point and I will do some bench marking and a write up on it. I will let you know what I find out!