Why is D's GC slower than GO's?

IGotD- nise at nise.com
Sun Oct 30 20:14:04 UTC 2022


On Sunday, 30 October 2022 at 19:26:56 UTC, Paulo Pinto wrote:
>
> You can read the documentation over here,
>
> https://clang.llvm.org/docs/AutomaticReferenceCounting.html
>
> https://developer.apple.com/library/archive/releasenotes/ObjectiveC/RN-TransitioningToARC/Introduction/Introduction.html#//apple_ref/doc/uid/TP40011226
>
> https://docs.swift.org/swift-book/LanguageGuide/AutomaticReferenceCounting.html
>
> And if there is some legacy Objective-C 2.0 GC code lying 
> around, there is
>
> https://developer.apple.com/library/archive/documentation/Cocoa/Conceptual/GarbageCollection/Introduction.html#//apple_ref/doc/uid/TP40002431
>
> Basically the attribute qualifiers for pointers and class 
> properties, specially in Objective-C case, and the Swift 
> Objective-C interop, influence the semantics and type semantics 
> of what ARC does with the pointers and their compatibility with 
> raw pointers that aren't managed by ARC.
>
> And the now dead tracing GC experiement, also had its own 
> flavour of GC managed pointers alongside raw ones.

Just for completeness, the Swift developers are currently 
experimenting with an ownership model. Because this overlaps a 
little bit what is happening with D, I provide you a link.

https://github.com/apple/swift/blob/main/docs/OwnershipManifesto.md

This would mean that Swift would be more Rust like and this also 
includes runtime no aliasing checks. If this will make into 
version 7 remains to be seen.



More information about the Digitalmars-d mailing list