On Borrow Checking

Richard (Rikki) Andrew Cattermole richard at cattermole.co.nz
Thu May 1 07:09:25 UTC 2025


On 01/05/2025 6:08 PM, Walter Bright wrote:
>     However, for a dedicated solution:
> 
> It's an interesting approach. I recommend hand-coding it, and testing 
> the performance.

I am unconvinced that such test code would be worth trying to benchmark.

On the newer x86 cpu's we're talking 1-8uops for atomic operations.

And test code tends not to reflect the problem domain, which for system 
handles involves a lot of costly syscalls and IPC, that make atomics and 
with that system lock basically free.

In saying that, unnecessary work is still unnecessary and removing it is 
a good thing. However I won't miss the optimizations, but I do miss not 
having classes that are RC (going with struct wrapper can result in CT 
errors).



More information about the Digitalmars-d mailing list