Search Unity

How much does L1 cache size boost ECS performance?

Discussion in 'Entity Component System' started by Arowx, Dec 20, 2018.

  1. Arowx

    Arowx

    Joined:
    Nov 12, 2009
    Posts:
    8,194
  2. temps12

    temps12

    Joined:
    Nov 28, 2014
    Posts:
    41
    Well I guess it depends more on how you write your code. ECS just helps us allocating data lineary to help us retrieve relevant data from the RAM. How we use that data when it is in the cache is up to us. So no, I dont think it will be a 50% boost to ECS but it sure is nicer to have a bigger cache.
     
  3. JesOb

    JesOb

    Joined:
    Sep 3, 2012
    Posts:
    1,109
    Actually I think bigger cash is help for cache unfriendly apps.

    So may be good ECS app will utilize CPU cores on 95% today and on 97% on SunnyCove
     
  4. 5argon

    5argon

    Joined:
    Jun 10, 2013
    Posts:
    1,555
    By "similar" you mean 50% more performance? As in execution time cut down by half/quarter?
    If that is what "how much" you meant, it should not be the case. At least not as simple as size = performance.

    You may reason "how much" along this line : What do we get from a larger L1 cache? Less often migration to L2 cache. When will the migration happen? When we need a new entry in L1 and it's full. That is when the memory requested is not in L1 (accessed prior) or any prefetched address (not yet accessed). In essence, it helps ECS cache miss more times, go back to cache hit, then maybe more new miss, and increase the chance that the previously missed address are still there in L1, so it does not result in L1 miss.

    Read this paper and you will be able to answer many will ___ cause ___ ? memory questions you have : https://people.freebsd.org/~lstewart/articles/cpumemory.pdf It does not go deep in how exactly the CPU prefetch, since the algorithm may differ per brand. But some benchmarks are there. You can see the steep threshold when it goes to L2.
     
    Last edited: Dec 20, 2018