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

Ola Fosheim Grøstad ola.fosheim.grostad at gmail.com
Sun Oct 30 08:56:29 UTC 2022


On Sunday, 30 October 2022 at 08:17:56 UTC, Paulo Pinto wrote:
> If you bothered to read the rational, the main reason are the 
> companies that care about GC in C++, like Epic and Microsoft, 
> didn't adopt the C++11  API.

That is not countering what I wrote: nobody uses it, there is no 
demand for a C++ GC.

> Every, single AAA game studio using Unreal has demand for 
> having GC in C++,

On the application level, not on the language level. This is no 
different from browsers providing a GC.

Most projects that can use a GC use a regular high level language 
with C interop.

btw, going all system level is generally too expensive unless 
your program is going to run on many machines. People make these 
calculations all the time. If you only run you application on one 
machine it is almost always cheaper to buy beefier hardware and 
write most of the code in a high level format. Even if that means 
Python + C module. That does not make Python system level.

> Most of that demand comes from cargo cult against any kind of 
> automatic memory management.

So the market is wrong? Or maybe they just do the most rational 
thing, use a high level language with C interop.

>> (Swift and Go are usually not considered system level.)
>
> Swift is definitly a system level, Apple is quite clear about 
> it on documentation and WWDC keynotes, and on iOS 16 it already 
> surpaced C++ usage.
>
> It is one of the reasons why Apple has stop caring about C++ 
> beyond C++17, and stepped away from clang contributions, 
> focusing on LLVM infrastructure.
>
> Also the main system programming language on Apple systems is 
> Objective-C, with reference counting, and officially deprecated 
> as of WWDC 2022 during the state of platforms keynote.

I dont really care what Apple says on their marketing events. I 
cannot use Swift to write a competitive runtime. It isnt system 
level at this point.

But yeah, iphone is taking the beefier hardware approach. The 
price tag on an entry level phone is insane. A very powerful 
display of marketing and the psychological aspect of markets.




More information about the Digitalmars-d mailing list