Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ECS / Jobs / using the Burst Compiler planned ?
#2
(02-08-2018, 10:28 PM)ibbybn Wrote: Hey Obi Team,
wondering if these Unity 2018 features are planned to be used? I guess it would meanĀ porting moreĀ from c++ to c#?
Would be interesting to see the performance gains. It seems fitted perfectly for particle systems running on CPU.
I ported a simple boid system ( fish swarm ) to jobs/ecs hybrid and got 20x performance gain so far.

Hi there,

Obi already uses something very similar to ECS internally, as it was designed with the same performance goals in mind:

- Particles are laid out in memory in a SoA fashion: separate arrays for positions, velocities, etc. Traversal is linear when possible, to maximize cache hits and throughput. These arrays are 16-byte aligned to make use of SIMD (SSE) instructions. This is the same core idea behind ECS. It is not something new, CPU particle systems have been designed this way for as long as the concept of cache memory exists.

- A work-stealing job scheduler dynamically distributes jobs across all cores. Jobs (tasks, in Obi terminology) are organized in a graph-like structure to avoid race conditions and make sure things happens in the order they're supposed to. This is the same technology behind Intel's TBB, Cilk, or C#'s TPL, again nothing new.

Moreover, all of this is written in C/C++ using SIMD, hand-optimized. The burst compiler is basically designed to translate C# code to efficient, vector-friendly C++ code, which is what we have by default.

Because of this, no gains are to be reaped from ECS or burst in our case. It is very unlikely we will make use of them.
Reply


Messages In This Thread
RE: ECS / Jobs / using the Burst Compiler planned ? - by josemendez - 03-08-2018, 03:45 PM