Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
notzippy opened this issue Apr 1, 2017 · 1 comment
Open

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

notzippy opened this issue Apr 1, 2017 · 1 comment

Comments

@notzippy
Copy link

notzippy commented Apr 1, 2017

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
Copy link
Owner

koepkeca commented Apr 5, 2017

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants