go - what is the performance impact of golang maps -
in golang, maps implemented using hash tables .i using locks of sync package readinng , writing in maps. there performance impact if 50,000 reqests try access map ? order of reading/writing maps? o(1)?
there 2 separate issues here:
- what performance of go map?
an answer can found in issue
- what performance implication of 50,000 goroutines contending on map.
this doesn't sound idea, can never know without benchmarking. might want consider sending map values asynchronously through buffered channel, if don't depend on fact map value written immediately.
you might want check out concurrent-map solving similar problem.
Comments
Post a Comment