Search Unity

Can we gain benefit from burst compiler without using ECS?

Discussion in 'General Discussion' started by benzsuankularb, Sep 4, 2018.

  1. benzsuankularb

    benzsuankularb

    Joined:
    Apr 10, 2013
    Posts:
    132
    Can we gain benefit from burst compiler without using ECS?

    I've implemented the framework alternative to ECS for using on both client and server.

    The approach is near but still different. I can't use fully ECS at this stage, However I can use pure ECS with others part like animation or rendering.

    Question is does burst compiler will work with my part of code?
    Else if not by default then how to make it work?
     
  2. hippocoder

    hippocoder

    Digital Ape

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    I think in your situation I'd be keen to embrace Jobs.
     
    benzsuankularb and Antypodish like this.
  3. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    I would suggest to ask this question on Unity ECS & Jobs forum
    https://forum.unity.com/forums/entity-component-system-and-c-job-system.147/

    As far I understand, Burst is configured for ECS, for best performance. What more, I suppose, it won't work with classic OOP architecture. However, I may be wrong, if that only the case.
    Yet, I would suggest, to give a try run burst. You will notice, or not, if does work, or there is any significant gain.

    But as @hippocoder stated, Jobs will be your first line to get a gain.
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,834
    To use burst, as far as I know, you have to use Jobs, and then the jobs become compiled by it when you strap-on an attribute. I think that's the only way to use it. So you have to use jobs but jobs don't necessarily have to use ECS whatsoever.
     
  5. Antypodish

    Antypodish

    Joined:
    Apr 29, 2014
    Posts:
    10,779
    Following example is for 76k rotation entities in ECS. However, I just drop it here out of interest, where Burst is disabled / enabled for case 1 and case 2 approaches. Example shows comparing two mathematical method.

    So perhaps in jobs you can get equivalent in some cases.