Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

If you’re trying to mutate a dictionary many times from many threads you’re going to have a bad time. The fix isn’t a faster mutex, it’s don’t do that.


Depends on the dictionary implementation. There's a number of thread safe dictionaries in the wild with varying degrees of parallelism performance. Pretty much all of them benefit from faster mutexes.

For example, some thread safe dictionaries will segment their underlying key/value pairs which allows them to have concurrent reads and writes for a given segment which significantly improves performance.


> Pretty much all of them benefit from faster mutexes.

Faster doesn't mean fast. You really, really want to not use a thread-safe dictionary.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: