btdu - a sampling disk usage profiler for btrfs (written in D)

Ola Fosheim Grostad ola.fosheim.grostad at
Fri Nov 27 12:00:40 UTC 2020

On Friday, 27 November 2020 at 11:31:48 UTC, IGotD- wrote:
> Reference counting which also means multiple ownership doesn't 
> play well well with any borrowing mechanism. Reason is that the 
> compiler cannot determine the borrow checker at compile time 
> and must insert runtime checks if you are allowed to borrow or 
> not. This reduces the performance, probably not a lot but 
> still. Let's leave borrow checker outside D and just have good 
> old reference counting, that's what we need.

You can view ARC as a borrowchecker. If the ARC optimizer 
succeeds globally then all acquire/release can be omitted for 
that type (or that call graph path).

The problem is interior pointers which would require fat pointers 
or borrowchecker...

But again you could rewrite those fat pointers if ARC 
optimization is highly successful (if the code validates like it 
would for a borrow checker)

More information about the Digitalmars-d mailing list