Search Unity

Question how do you profile memory bandwidth?

Discussion in 'Editor & General Support' started by laurentlavigne, Sep 1, 2022.

  1. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    i think i'm shuffling around data too much but not sure where.
    memory profiles only shows allocation but not transfer so that's no use.
     
  2. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
  3. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
  4. Neto_Kokku

    Neto_Kokku

    Joined:
    Feb 15, 2018
    Posts:
    1,751
    Nope, because there's a massive distance between written C# and the final code that actually runs on the CPU shuffling bits around. A single line of code can be turned into a couple, tens, or hundreds of CPU instructions (or even zero).

    No idea if it's even possible to bridge the gap with Mono, but when profiling IL2CPP builds you might be able to at least get to know in which functions things are happening, and get a rough idea of where to focus.
     
    laurentlavigne likes this.
  5. laurentlavigne

    laurentlavigne

    Joined:
    Aug 16, 2012
    Posts:
    6,363
    I guess it's a start so I'll give this a shot. Thanks.