[Off-Topic] John Carmack's point of view on GC and languages like JavaScript

Paulo Pinto pjmlp at progtools.org
Fri Aug 12 05:33:18 UTC 2022


On Thursday, 11 August 2022 at 20:55:23 UTC, IGotD- wrote:
> On Thursday, 11 August 2022 at 13:20:13 UTC, wjoe wrote:
>> [...]
>
> Yes, real time code today will avoid GC all together. Likely it 
> will use custom everything, like specialized allocators, caches 
> and container algorithms. All in order to avoid memory 
> allocation from a heap as well as avoiding memory fragmentation.
>
> Many times real time systems has a real time part but also a 
> non real time part which often runs a rich OS like Linux. 
> Services in the rich OS part can usually use GC without any 
> problems.
>
> In terms of computer games, correct me if I'm wrong but GC will 
> become the norm there. The reason is that computer games are 
> becoming more and more advanced and there is so much stuff 
> going on that GC becomes a lesser problem compared to 
> everything else in terms of performance. Probably if I came to 
> a computer game technical manager in 20 years and said I wanted 
> to use GC, he would probably kill me. Today if I said the same, 
> he would say it's probably ok. I'm not that convinced by the 
> Doom example as there seem to be a confusion between caches and 
> GC. You are welcome to come with more examples of early 
> computer games that used GC.

Unless the game doesn't support any kind of scripting language, 
there will be some level of GC taking place, Blueprints, Lua, 
Python, GDScript,.....

And then there are the engines that expose it even to the engine 
layer itself, Unreal, SceneKit, Stride, MonoGame, PlayCanvas, 
BabylonJS....



More information about the Digitalmars-d mailing list