You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 ?
The text was updated successfully, but these errors were encountered:
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 ?The text was updated successfully, but these errors were encountered: