Re:Are Go maps sensitive to data races?
by alkonaut on Monday December 07, 2015 @07:41AM
(#10689045)
There are both memory and performance considerations. For a server/db web application this may not be a problem, but for e.g. some logic in a game engine that runs every frame on a mobile device, then using 16 extra locks per map for example isn't a good idea. Nor is having 5% performance overhead.
I can agree with an argument that thread-safe should be default and specialized/fast collections should be optional though.
Re:Are Go maps sensitive to data races?
by astrafoo on Monday December 07, 2015 @12:25PM
(#10690889)
People who care about 5% performance overhead will never use Go in the first place.
Re:Are Go maps sensitive to data races?
by alkonaut on Monday December 07, 2015 @02:05PM
(#10691783)
That's just not true. Regardless of language there is always a portion of the code where you need to be careful with performance. I have spent endless hours tweaking map performance in .NET, for example.
You know, two thirds of the way through the second decade of the 21st century, it's okay to spend a few cycles not corrupting your data structures.