L2 Vs. L3 CPU cache speed and performance

12,914

Solution 1

It depends. If the inner loop of your program fits into the L1 cache of both CPUs and memory speeds are the same, you won't see much difference.

If the inner loop fits into the 6MB L2 cache, but does not fit into the L2 cache of the CPU with 6MB L3 cache, then the program will be faster on the older CPU with the larger L2 cache.

But in general, the inner loop part of a program is very small.

Solution 2

Intel uses a new cache technology called "Smart Cache" so I doubt any comparisons between current models now and CPUs from years ago are on a level playing field. Keep in mind that I think "Smart Cache" is an Intel technology only; AMD uses something called "Balanced Smart Cache".

Wikipedia info:

Smart Cache is a level 2 or level 3 cache method for multiple execution cores invented by Intel. It shares the cache among cores (CPU Core or GPU). In comparison to a dedicated cache per core the overall cache miss rate decreases in times where not all cores need equally much cache space. Consequently a single core can use the full level 2 cache or level 3 cache, if the other cores are inactive. Furthermore the shared cache makes it faster to share memory among different execution cores.

Share:
12,914

Related videos on Youtube

thedrs
Author by

thedrs

20 Years experience in the development world. C++ and C# .NET in visual studio environments & JavaEE in Eclipse env. A lot of IT experience in windows and unix/linux environments.

Updated on September 17, 2022

Comments

  • thedrs
    thedrs over 1 year

    In the past few years, looking at Intel CPUs, there has been a move from large size L2 cache to large size L3 cache. A lot of this is due to having more cores on the CPU and wanting to share the cache between them (an L3 advantage).

    But supposing I have a single threaded application and I want to compare the speed I get running it on 2 different CPUS that share the same clock speed :

    1. a CPU with 6MB L2 cache @3.1Ghz (e.g., Core 2 Duo E8500)

    2. a CPU with 6MB L3 cache @3.1Ghz (e.g., Core i5 2400)

    Disregarding turbo boost effects and faster DDR factors, It seems the first (older) CPU should perform much faster (as it is closer to the core level), no ?

    Another question that interests me, In old times, back in the first days of L2 cache in CPUs I seem to recall that L2 cache is accessed at half the CPU clock speed, is that still true today ? and what about L3 speed ?

    • 100rabh
      100rabh about 13 years
      AFAIK, L2/L3 is accessed at clock speed. As for the first question - there's no way to answer it.
  • thedrs
    thedrs about 13 years
    thanks for the answer... I guessed as much... but the speed issue still is not known to me ... at what speeds do each cache level run at