[OT] Unity migrating parts of their engine from C++ into High Performace C# (HPC#)
12345swordy
alexanderheistermann at gmail.com
Mon Apr 2 18:54:28 UTC 2018
On Monday, 2 April 2018 at 17:30:20 UTC, Paulo Pinto wrote:
> A bit off topic, yet still relevant given the ongoing attempts
> for D to be usable on the games industry.
>
> At this year's GDC Unity had a few talks of the new subsystems
> being transitioning from internal engine code in C++ into upper
> layers written in C#.
>
> For that purpose they are introducing a new compiler, based on
> LLVM and targeted to a subset of C# features, they are calling
> it High Performace C#.
>
> Keypoints of the subset:
>
> - Only structs are used, no classes;
> - .NET collections are replaced by native collections that
> manage their own memory
> - No code that would trigger GC is allowed
> - Compiler is aware of Unity features and is able to explore
> SIMD, by doing auto-vectorization, and transparently transform
> structs fields into optimal representations
>
> They plan to take advantage of the new C# 7.x ref type features
> after integrating the new compiler infrastructure.
>
> "Unity at GDC - C# Sharp to Machine Code"
>
> https://www.youtube.com/watch?v=NF6kcNS6U80
>
> Also relevant,
>
> "Job System & Entity Component System"
> https://www.youtube.com/watch?v=kwnb9Clh2Is
>
> "A Data Oriented Approach to Using Component Systems"
>
> https://www.youtube.com/watch?v=p65Yt20pw0g
>
> Some might remember Mike Acton's talk at CppCon about
> data-oriented programming, he is one of the developers leading
> this effort.
>
> https://www.mcvuk.com/development/exclusive-unity-takes-a-principled-step-into-triple-a-performance-at-gdc
Interesting that they are going the "No classes allowed"
approach. It looks like the bullet points can be done in better c
mode of D.
Regardless, I been pushing for a way to deallocated classes in
the @nogc context, which apparently not very much people here
seemed to care about.
More information about the Digitalmars-d
mailing list