Unity DOTS vs Bevy - A Performance Comparison

  Рет қаралды 24,147

Sandeep Nambiar

Sandeep Nambiar

Күн бұрын

Пікірлер: 51
@user-iw1gy7ev6e
@user-iw1gy7ev6e Жыл бұрын
Sorry, but if you are doing such a thing, do it correctly. There are a few issues here: - you used a renderer, which makes little sense for this comparison - your Unity implementation has serious memory leaks - your Unity project was set to use Mono instead of IL2CPP - you didn't disable vsync I downloaded the repo and fixed the issues myself. I removed the renderer from both entirely, fixed the memory leaks in Unity, set it to build with IL2CPP instead of Mono and disabled vsync. On dual E5-2690v2 (DDR3) with 500.000 units: - Unity 105 FPS, 30% CPU usage, 460mb RAM - Bevy 49 FPS, 34% CPU usage, 1496mb RAM On i9-14900k (DDR5) with 1.000.000 units: - Unity 152 FPS, 87% CPU usage, 803mb RAM - Bevy 69 FPS, 60% CPU usage, 2914mb RAM
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
oh this is great! thanks for the feedback! I'll incorporate them and try this again. and maybe drop a line to the bevy discord as well about this. would you mind opening a pr for these changes so that I can run this too! I'm especially curious about the memory leaks!
@DerrickTheFork
@DerrickTheFork Жыл бұрын
I'm curious: did you make any optimizations to the Unity version besides turning off cameras, IL2CPP, vsync and fixing memory leaks? I did a refactor of the Unity version as well because I was seeing a bunch of issues with it, but at the end of the day, despite seeing improvements on the Unity side, Bevy was still performing better. There are optimizations that could've been done to the unity version, like using custom transform parenting, removing all mesh renderer components (reducing archetype sizes), getting rid of structural changes 100%, or just changing the way logic is done, but I avoided that because then I would've had to do the same in Bevy for fairness. I'm mostly interested in knowing if that's what you did
@laundmo
@laundmo Жыл бұрын
i'm pretty sure if anyone truly cared they could speed up the bevy side again, by quite a lot. 3gb RAM sounds a lot like theres quite a few components on the entities which might not need to be there, for example. after all, benchmarking perf optimisations is a game you can play ad infinitum. all this tells me is that both are super fast enough, and to consider other factors because ECS performance clearly is not a issue.
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
@@laundmo yep thank you for re-iterating the my main findings. ecs performance might be irrelevant to the choices here.
@josephdelgado7644
@josephdelgado7644 11 ай бұрын
can you post the source for the modified versions?
@alinmgheorghe
@alinmgheorghe 10 ай бұрын
I think an official marriage between Unity and Rust would make the most difference and blow out of the park the other competitors.
@Caellyan
@Caellyan 9 ай бұрын
Rust has bevy, and Unity has its weird licensing. Not really something that would benefit game quality long term.
@specific_protagonist
@specific_protagonist Жыл бұрын
Nice testing. Your repo is also useful for comparing these two ECS implementations ergonomics-wise.
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
I agree! I'm planning to do exactly that in the next video. Compare the ergonomics of bevy vs unity dots.
@doce3609
@doce3609 Жыл бұрын
Love the Acerola black screen reference
@lets.build.cool.things
@lets.build.cool.things Жыл бұрын
Could you share a profiling capture comparison from both engines please? Pretty absurd to compare one engine with unlocked fps and actual frame timings against a vsynced one always showing 16 ms update time. Thank you 🙏🏼
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
Yes that makes sense. :) I'll add that to the description over the weekend. You can also run the projects btw, there is a link the description. I agree I kind of messed up with the vsync. But it really doesn't matter imo. Going below 16ms was the test I was going for. Thank you for your feedback though. I'll add more details for future videos. :pray:
@piot
@piot Жыл бұрын
Again, thanks for your hard work! I really hope that people see this and switch to Rust
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
Thank you for your kind words Peter! This means a lot and is very encouraging for me.
@ArnCiS96
@ArnCiS96 2 ай бұрын
What about flecs vs smth ?
@OskarNendes
@OskarNendes 9 ай бұрын
Now do a Rust + modern opengl versus Unity.
@BossGxngOfficial
@BossGxngOfficial Жыл бұрын
This is awesome 😲
@Rogue_78
@Rogue_78 Жыл бұрын
TLDR: Bevy is better
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
Yes and no. In my opinion, performance should not be a metric (yet) to switch.
@Boxing_Gamer
@Boxing_Gamer 8 ай бұрын
​@@_sandeepnambiarit should be because at one point you'll need that performance..and c sharp just can't deliver.
@odo432
@odo432 6 ай бұрын
@@Boxing_Gamer C# can get fairly close to C++ performance. Especially with Span and SIMD operations.
@pietraderdetective8953
@pietraderdetective8953 3 ай бұрын
Coping mechanism of the crab people?
@lufenmartofilia5804
@lufenmartofilia5804 3 ай бұрын
​@@Boxing_Gameras much as I hate C#, this is bullshit.
@v037_
@v037_ Жыл бұрын
These perfomances are important for slow devices, your computer runs too fast, try that profiling on a cheap ass old laptop with an intel core duo
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
Hmm that's a good idea. I could probably run these on a virtual machine on the cloud and get metrics from them.
@mehowop
@mehowop Жыл бұрын
@@_sandeepnambiar You can make custom power plan with maximum state of cpu set to 1% ( so your cpu clock will stay at possible lowest clock, on my i5-4690 its 800mhz ). You can also use some cpu benchmark ( cpu-z have nice stress test ) and than by changeing state % you can create bunch of profiles with different maximum cpu clock.
@Don-zo3ts
@Don-zo3ts Жыл бұрын
Nambiar ? Malayali anooo😅
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
yes sir! :)
@Don-zo3ts
@Don-zo3ts Жыл бұрын
@@_sandeepnambiar 🤩👋
@Victor_Js
@Victor_Js 4 ай бұрын
Unity3d very bad, no NET8. C# NET 8 + Native Memory + Parallel ForEach = Rust performance. There are a lot of game engines that support NET 8, specifically 4. All with the performance of Bevy because they support NET 8 without garbage collection GC. I also did tests and I speak with authority. Unity3d 3D is outdated, it will take years to have modern NET
@_sandeepnambiar
@_sandeepnambiar 3 ай бұрын
i agree. though coreclr is on their roadmap. that would be a nice day to wake up to!
@u9vata
@u9vata Жыл бұрын
I am honestly not impressed. Know handcrafted C++ stuff that can go 10x to 100x faster than dots so kind of expected bevy to be at least half of that but it looks like rust seem so fast mostly to javascript people not c++ hiperf people..... Also Godot without ecs-ing does often close to dots which also shows how not optimal it is. But of course its often more than enough honestly anyways.
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
yep i was surprised as well. i maybe expected more. but its early days for bevy. i'm sure it gets faster in the future. I'm also sure that a handcrafted rust game would go extremely fast as well.
@laundmo
@laundmo Жыл бұрын
​@@_sandeepnambiarbevy has so far not focused too much on raw ECS speed. more on general performance for common game systems like transform hierachies and animations on the CPU side. the main dev of Flecs, a very performant C++ ECS, hangs around the bevy discord regularily and also did performance benchmarks, none of which show a 10x difference.
@Tarodev
@Tarodev Жыл бұрын
Could you please share the source that demonstrates Godot achieving performance comparable to an ECS? I find this doubtful.
@u9vata
@u9vata Жыл бұрын
@@Tarodev IT was here on YT somewhere. And yes it was on-par (but lower performance). Godot was somewhere between Unity perf and ECS perf in tests of "when moving around x objects starts to lag". Seriously closer to ecs than to unity default... Ecs is really not that hugely powerful - only when compared to the unity default which is really bad architecture. You can go watch non-ecs C++ codes easily beating ECS in same scenario so this is not a miracle - neither this makes ECS bad or anything... it was a step in good direction...
@odo432
@odo432 10 ай бұрын
@@Tarodev The only way to achieve this is with C++ and utilising Godot's low-level API (eg Rendering Server). I did use Arch ECS + MultiMesh in Godot and achieved slightly better performance than Unity Entities + DrawMeshInstanced (similar to what you did in your performance comparison video). I in fact reverse engineered Unity's Systems to work with Godot and Arch (which was surprisingly easy as Arch was inspired by Unity ECS). Rendering 100k cubes at 80+fps. Obviously when utilising Unity DOTS or DrawMeshInstancedIndirect Unity completely trumps Godot. But I thought it was still impressive nonetheless. Absolutely no chance you could achieve this using the default OOP.
@DevBookOfArray
@DevBookOfArray Жыл бұрын
very great video
@_sandeepnambiar
@_sandeepnambiar Жыл бұрын
Thank you very much!
Switching Game Engines... Twice? - Devlog #7
10:55
TIMBER
Рет қаралды 87 М.
ChatGPT makes Voxel Engine with Rust
12:20
Tantan
Рет қаралды 101 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН
Каха и дочка
00:28
К-Media
Рет қаралды 3,4 МЛН
Use Blender as a Bevy Editor
12:03
chris biscardi
Рет қаралды 16 М.
I Tried The "Game Engine Of The Future"
26:13
Fredyy
Рет қаралды 48 М.
How Do Game Devs NOT Overscope??
9:04
Green Light Dev
Рет қаралды 13 М.
Unity DOTS vs Assembly Benchmark - Which is fastest?
30:34
Lingon Studios
Рет қаралды 84 М.
Blazingly Fast Greedy Mesher - Voxel Engine Optimizations
23:35
I Optimised My Game Engine Up To 12000 FPS
11:58
Vercidium
Рет қаралды 768 М.
The Best Games from Bevy Jam 5
9:54
chris biscardi
Рет қаралды 10 М.
Comparing Unity DOTS and Bevy
7:08
Logic Projects
Рет қаралды 10 М.
It’s all not real
00:15
V.A. show / Магика
Рет қаралды 20 МЛН