By their very name caches are often overlooked and yet play a vital role in the performance of modern and indeed future hardware. Using MAGPIE (Machine Automated General Performance Improvement via Evolution of software) we show genetic improvement GI can reduce the cache load of existing computer programs. Operating on lines of C and C++ source code using local search, Magpie can generate new functionally equivalent variants which generate fewer L1 data cache misses. Cache miss reduction is tested on two industrial open source programs (Google's Open Location Code OLC and Uber's Hexagonal Hierarchical Spatial Index H3) and two 2D photograph image processing tasks, counting pixels and OpenCV's SEEDS segmentation algorithm. Magpie's patches functionally generalise. In one case they reduce data misses on the highest performance L1 cache dramatically by 47 percent.
翻译:缓存这一名称本身就常被忽视,然而它在现代乃至未来硬件的性能中扮演着至关重要的角色。通过使用MAGPIE(基于软件进化的机器自动通用性能改进)方法,我们展示了遗传改进(GI)能够减少现有计算机程序的缓存负载。通过对C和C++源代码行进行局部搜索操作,MAGPIE能够生成新的、功能等价的变体,这些变体产生的L1数据缓存缺失更少。缓存缺失减少的效果在两种工业开源程序(谷歌的Open Location Code(OLC)和优步的Hexagonal Hierarchical Spatial Index(H3))以及两种二维照片图像处理任务(像素计数和OpenCV的SEEDS分割算法)上进行了测试。MAGPIE的补丁具有功能通用性。在一个案例中,它们将高性能L1缓存上的数据缺失显著降低了47%。