arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2512.07841cs.AIcs.PF
收藏

数据导向与面向对象设计对人工智能算法在多线程CPU中的性能和缓存利用率的影响

Impact of Data-Oriented and Object-Oriented Design on Performance and Cache Utilization with Artificial Intelligence Algorithms in Multi-Threaded CPUs

Federal University of Rio Grande (FURG), Rio Grande, Brazil(里约格兰德联邦大学);Catholic University of Pelotas (UCPel), Pelotas, Brazil(佩洛塔斯天主教大学)

Gabriel M. Arantes, Giancarlo Lucca, Eduardo N. Borges, Richard F. Pinto, Bruno L. Dalmazo, Rafael A. Berri

AI总结:

本研究比较了数据导向与面向对象设计在多线程CPU中对人工智能算法性能和缓存利用率的影响,发现DOD在数据密集型任务中表现更优。

摘要:

多核CPU与主内存之间性能差距的扩大, necessitates 软件设计范式需要考虑硬件因素。 本研究全面分析了数据导向设计(DOD)与传统面向对象设计(OOD)的性能,重点研究多线程环境中的缓存利用率和效率。 我们开发并比较了A*搜索算法的四个不同版本:单线程面向对象设计(ST-OOD)、单线程数据导向设计(ST-DOD)、多线程面向对象设计(MT-OOD)和多线程数据导向设计(MT-DOD)。 评估基于执行时间、内存使用和CPU缓存缺失等指标。 在多线程测试中,DOD实现表现出显著的性能提升,执行时间更短,系统调用和缓存缺失次数更少。 虽然OOD偶尔在内存使用或百分比缓存缺失率上显示出微小优势,但DOD在数据密集型操作中的效率更为明显。 此外,我们的发现表明,对于细粒度任务如A*算法,线程管理的开销导致单线程版本在两种范式中均显著优于多线程版本。 我们得出结论,即使在简单算法中性能差异显得微妙,DOD在关键指标上的一致优势凸显了其基础架构的优越性,表明它在复杂、大规模AI和并行计算任务中更有效的方法以最大化硬件效率。

英文摘要:

The growing performance gap between multi-core CPUs and main memory necessitates hardware-aware software design paradigms. This study provides a comprehensive performance analysis of Data Oriented Design (DOD) versus the traditional Object-Oriented Design (OOD), focusing on cache utilization and efficiency in multi-threaded environments. We developed and compared four distinct versions of the A* search algorithm: single-threaded OOD (ST-OOD), single-threaded DOD (ST-DOD), multi-threaded OOD (MT-OOD), and multi-threaded DOD (MT-DOD). The evaluation was based on metrics including execution time, memory usage, and CPU cache misses. In multi-threaded tests, the DOD implementation demonstrated considerable performance gains, with faster execution times and a lower number of raw system calls and cache misses. While OOD occasionally showed marginal advantages in memory usage or percentage-based cache miss rates, DOD's efficiency in data-intensive operations was more evident. Furthermore, our findings reveal that for a fine-grained task like the A* algorithm, the overhead associated with thread management led to single-threaded versions significantly outperforming their multi-threaded counterparts in both paradigms. We conclude that even when performance differences appear subtle in simple algorithms, the consistent advantages of DOD in critical metrics highlight its foundational architectural superiority, suggesting it is a more effective approach for maximizing hardware efficiency in complex, large-scale AI and parallel computing tasks.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑