Want reasonable reference counting? Disable automatic sharing of immutable

deadalnix deadalnix at gmail.com
Fri Nov 12 17:46:55 UTC 2021


I really don't think this makes sense.

Providing people with tool to work on multiple cores (and we are 
aggressively moving toward heterogeneous compute, so it's getting 
worse).

On the other hand, atomic are becoming cheaper and cheaper with 
each generation of pretty much every platforms. This is mostly 
due to the fact most machines now do regular loads/stores 
optimistically and speculate from there, just like they do for 
branch predictions. If it turns out there was contention then 
they rewind and revert back to do it in a more expensive fashion.

So that trade does not seems to make sense.


More information about the Digitalmars-d mailing list