From 458e3fb67f8675b1952b020615213df7df89211d Mon Sep 17 00:00:00 2001 From: Kim Walisch Date: Wed, 6 Nov 2024 19:06:24 +0100 Subject: [PATCH] Update comment --- src/CpuInfo.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/CpuInfo.cpp b/src/CpuInfo.cpp index 89719ec2..a81f85f3 100644 --- a/src/CpuInfo.cpp +++ b/src/CpuInfo.cpp @@ -202,10 +202,10 @@ void CpuInfo::init() if (cacheInfo.size() <= cpuCoreId) cacheInfo.resize((cpuCoreId + 1) * 2); - // Intel Arrow Lake CPUs have two L1 data caches. These - // caches are ordered from fastest to slowest. Since we are - // interested in the fastest L1 data cache, we only store - // the information about the first L1 data cache we find. + // If the CPU has multiple caches of the same level, then + // we are only interested in the first such cache since + // this is likely the fastest cache. Usually, all caches + // are ordered from fastest to slowest. if (cacheInfo[cpuCoreId].cacheSizes[level] != 0) continue; @@ -300,10 +300,10 @@ void CpuInfo::init() { auto level = info[i].Cache.Level; - // Intel Arrow Lake CPUs have two L1 data caches. These - // caches are ordered from fastest to slowest. Since we are - // interested in the fastest L1 data cache, we only store - // the information about the first L1 data cache we find. + // If the CPU has multiple caches of the same level, then + // we are only interested in the first such cache since + // this is likely the fastest cache. Usually, all caches + // are ordered from fastest to slowest. if (cacheSizes_[level] != 0) continue; @@ -705,10 +705,10 @@ void CpuInfo::init() if (level >= 1 && level <= 3) { - // Intel Arrow Lake CPUs have two L1 data caches. These - // caches are ordered from fastest to slowest. Since we are - // interested in the fastest L1 data cache, we only store - // the information about the first L1 data cache we find. + // If the CPU has multiple caches of the same level, then + // we are only interested in the first such cache since + // this is likely the fastest cache. Usually, all caches + // are ordered from fastest to slowest. if (cacheSizes_[level] != 0) continue;