Open notzippy opened 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!
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 usingsync.Mutex
and see how your benchmarks perform ?