I think this is quite an interesting video. Would love to have source code to compare. IMO it's not really a Godot vs Unity performance comparison, but more of a Microsoft CoreCLR C# (what Godot uses) vs Unity Mono C#.

I feel many who theorized about C# performance in Godot really forgot how much better the Microsoft version is, to the point you have to use ECS in Unity to match regular C# code in Godot.

https://www.youtube.com/watch?v=8v5SrgkC_dI

Godot C# vs Unity C# and ECS - Comparing Game Engine Performance

YouTube

For those who want it a bit more technical, IMO the memory needed for 5000 bees fits happily in the L3 cache, for which ECS in itself should not be much of an improvement, and neither Godot nor Unity should have much issue drawing those many sprites, so to me this is more of an C++ <-> C# API glue and C# runtime benchmark.

Being Unity is literally a C# engine, I don't think it has worse glue code than Godot, so IMO this is more about the C# runtime.

@reduz Hmm, at least few years ago, Unity was written in C++ with C# being used on "user" side mostly. But of course that could change, and more and more engine components might be written in C# today…
@reduz unity is a c++ engine with a c# frontend
@morten_skaaning Right, this is why I think their glue code must be very efficient and the problem reside at the C# level.
@reduz i think they mostly generate the glue code so the memory layout of c# and c++ is the same, so you can just reinterpret_cast. Unity had some focus on not doing managed allocs in glue code, but I don't know if they kept it up after DOTS.
@reduz Everything fits into L3 these days (50+ MiB). A good data structure for the bees should fit those 5000 bees into the L1 of a single core ...
@anteru You are right, in my mental model from 10 years ago it was always like:
L1: few kb
L2: few more kb per core
L3: actual working memory for all cores
I always forget how massive caches are today and they keep growing.
@reduz @anteru yeah it’s nuts. Whole HDD from my first PC would not only fit into RAM, it would fit into L3 cache of everyday CPUs
@aras @reduz Technically, you should be able to boot every OS from our childhood without even plugging in RAM, ever, but that's not as broadly supported as it should be. There's really no reason to have to plug in a memory stick just to run a USB stick to update a SSD/firmware BIOS, for example.
@reduz Also maybe rendering had a bit to do , though it seem’s like it gains similar performance here, because it just has to call it one time in godot( not sure if unity did the same though, but i think the best way would be good ecs c++ performant code to match or surpass unity..