3 ms·
One nitpick with this: when the author first uses a mutex to ensure safety, he says "the operations took over 50 times longer!" Well sure. But "the operations"
by cjensen 4y ago
One nitpick with this: when the author first uses a mutex to ensure safety, he says "the operations took over 50 times longer!"
Well sure. But "the operations" were single read and writes to a small array likely held in cache. For more complex data structs, it's easy to see that they would take ten times or more longer than reading from a fixed location -- leading to only a 5X slowdown. That might still be a lot, but I'm still going to nitpick the "50" comment :-)