2 ms·
Multiple threads accessing single pieces of data is always slow. The standard answer is "don't do that"; you can do that just as well with GC or manual manageme
by FeepingCreature 3y ago
Multiple threads accessing single pieces of data is always slow. The standard answer is "don't do that"; you can do that just as well with GC or manual management.
- rwmj 3y agoConfirming you have no idea what you're talking about.
- kragen 3y agoas i understand it, multiple threads reading single pieces of data is faster than multiple threads reading different copies of the same data, as long as you don't have to lock them or increment their reference counts. it's faster because it reduces cache pressure. rcu is a widely used, highly performant way for many threads to read single pieces of data without having to lock them even if they might change. often you can even implement garbage collection without having to acquire readlocks on garbage-collectable things