计算机工程与科学2025,Vol.47Issue(1):18-26,9.DOI:10.3969/j.issn.1007-130X.2025.01.003
面向向量部件的指数和对数函数优化方法
Optimization of exponential and logarithm functions for vector units
摘要
Abstract
Exponential and logarithmic functions are important transcendental functions in floating-point computation,widely used in various application fields.Modern processors exhibit a trend of in-creasing vector register width with each generation.To further enhance the utilization of vector units by upper-layer applications,researching optimization methods for vector exponential and logarithmic func-tions holds significant scientific value and practical importance.Addressing the performance bottlenecks of existing vector function implementations,this paper has designed and implemented optimization methods for exponential and logarithmic functions tailored for vector units.These methods include vec-tor lookup table optimization based on hardware acceleration instructions,branch optimization,and precision-performance trade-off optimization.Experiments on simulators demonstrate that the optimized vector exponential and logarithmic functions meet industry-standard high precision and outperform the current best open-source implementations,achieving a speedup ratio of over 1.44.Real-world applica-tion tests further show that applications can achieve efficient vectorization with the support of the opti-mized vector functions,resulting in an average performance improvement of 2.53 times compared to the original scalar implementations.关键词
指数函数/对数函数/向量化/查表优化/硬件加速指令Key words
exponential functions/logarithm functions/vectorization/table-lookup optimization/hard-ware acceleration instructions分类
信息技术与安全科学引用本文复制引用
沈洁,龙标,黄春,唐滔,彭林..面向向量部件的指数和对数函数优化方法[J].计算机工程与科学,2025,47(1):18-26,9.基金项目
国家重点研发计划(2020YFA0709803) (2020YFA0709803)
国家自然科学基金(61902407) (61902407)